require=(function e(t,n,r){function s(o,u){if(!n){if(!t){var a=typeof require==“function”&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(“Cannot find module ‘”o“’”);throw f.code=“MODULE_NOT_FOUND”,f}var l=n={exports:{}};t[0].call(l.exports,function(e){var n=t[1];return s(n?n:e)},l,l.exports,e,t,n,r)}return n.exports}var i=typeof require==“function”&&require;for(var o=0;o);return s})({1:[function(require,module,exports){ ‘use strict’;

var XHTMLEntities = require(‘./xhtml’);

var hexNumber = /^[da-fA-F]+$/; var decimalNumber = /^d+$/;

module.exports = function(acorn) {

var tt = acorn.tokTypes;
var tc = acorn.tokContexts;

tc.j_oTag = new acorn.TokContext('<tag', false);
tc.j_cTag = new acorn.TokContext('</tag', false);
tc.j_expr = new acorn.TokContext('<tag>...</tag>', true, true);

tt.jsxName = new acorn.TokenType('jsxName');
tt.jsxText = new acorn.TokenType('jsxText', {beforeExpr: true});
tt.jsxTagStart = new acorn.TokenType('jsxTagStart');
tt.jsxTagEnd = new acorn.TokenType('jsxTagEnd');

tt.jsxTagStart.updateContext = function() {
  this.context.push(tc.j_expr); // treat as beginning of JSX expression
  this.context.push(tc.j_oTag); // start opening tag context
  this.exprAllowed = false;
};
tt.jsxTagEnd.updateContext = function(prevType) {
  var out = this.context.pop();
  if (out === tc.j_oTag && prevType === tt.slash || out === tc.j_cTag) {
    this.context.pop();
    this.exprAllowed = this.curContext() === tc.j_expr;
  } else {
    this.exprAllowed = true;
  }
};

var pp = acorn.Parser.prototype;

// Reads inline JSX contents token.

pp.jsx_readToken = function() {
  var out = '', chunkStart = this.pos;
  for (;;) {
    if (this.pos >= this.input.length)
      this.raise(this.start, 'Unterminated JSX contents');
    var ch = this.input.charCodeAt(this.pos);

    switch (ch) {
    case 60: // '<'
    case 123: // '{'
      if (this.pos === this.start) {
        if (ch === 60 && this.exprAllowed) {
          ++this.pos;
          return this.finishToken(tt.jsxTagStart);
        }
        return this.getTokenFromCode(ch);
      }
      out += this.input.slice(chunkStart, this.pos);
      return this.finishToken(tt.jsxText, out);

    case 38: // '&'
      out += this.input.slice(chunkStart, this.pos);
      out += this.jsx_readEntity();
      chunkStart = this.pos;
      break;

    default:
      if (acorn.isNewLine(ch)) {
        out += this.input.slice(chunkStart, this.pos);
        out += this.jsx_readNewLine(true);
        chunkStart = this.pos;
      } else {
        ++this.pos;
      }
    }
  }
};

pp.jsx_readNewLine = function(normalizeCRLF) {
  var ch = this.input.charCodeAt(this.pos);
  var out;
  ++this.pos;
  if (ch === 13 && this.input.charCodeAt(this.pos) === 10) {
    ++this.pos;
    out = normalizeCRLF ? '\n' : '\r\n';
  } else {
    out = String.fromCharCode(ch);
  }
  if (this.options.locations) {
    ++this.curLine;
    this.lineStart = this.pos;
  }

  return out;
};

pp.jsx_readString = function(quote) {
  var out = '', chunkStart = ++this.pos;
  for (;;) {
    if (this.pos >= this.input.length)
      this.raise(this.start, 'Unterminated string constant');
    var ch = this.input.charCodeAt(this.pos);
    if (ch === quote) break;
    if (ch === 38) { // '&'
      out += this.input.slice(chunkStart, this.pos);
      out += this.jsx_readEntity();
      chunkStart = this.pos;
    } else if (acorn.isNewLine(ch)) {
      out += this.input.slice(chunkStart, this.pos);
      out += this.jsx_readNewLine(false);
      chunkStart = this.pos;
    } else {
      ++this.pos;
    }
  }
  out += this.input.slice(chunkStart, this.pos++);
  return this.finishToken(tt.string, out);
};

pp.jsx_readEntity = function() {
  var str = '', count = 0, entity;
  var ch = this.input[this.pos];
  if (ch !== '&')
    this.raise(this.pos, 'Entity must start with an ampersand');
  var startPos = ++this.pos;
  while (this.pos < this.input.length && count++ < 10) {
    ch = this.input[this.pos++];
    if (ch === ';') {
      if (str[0] === '#') {
        if (str[1] === 'x') {
          str = str.substr(2);
          if (hexNumber.test(str))
            entity = String.fromCharCode(parseInt(str, 16));
        } else {
          str = str.substr(1);
          if (decimalNumber.test(str))
            entity = String.fromCharCode(parseInt(str, 10));
        }
      } else {
        entity = XHTMLEntities[str];
      }
      break;
    }
    str += ch;
  }
  if (!entity) {
    this.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.jsx_readWord = function() {
  var ch, start = this.pos;
  do {
    ch = this.input.charCodeAt(++this.pos);
  } while (acorn.isIdentifierChar(ch) || ch === 45); // '-'
  return this.finishToken(tt.jsxName, this.input.slice(start, this.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.jsx_parseIdentifier = function() {
  var node = this.startNode();
  if (this.type === tt.jsxName)
    node.name = this.value;
  else if (this.type.keyword)
    node.name = this.type.keyword;
  else
    this.unexpected();
  this.next();
  return this.finishNode(node, 'JSXIdentifier');
};

// Parse namespaced identifier.

pp.jsx_parseNamespacedName = function() {
  var startPos = this.start, startLoc = this.startLoc;
  var name = this.jsx_parseIdentifier();
  if (!this.options.plugins.jsx.allowNamespaces || !this.eat(tt.colon)) return name;
  var node = this.startNodeAt(startPos, startLoc);
  node.namespace = name;
  node.name = this.jsx_parseIdentifier();
  return this.finishNode(node, 'JSXNamespacedName');
};

// Parses element name in any form - namespaced, member
// or single identifier.

pp.jsx_parseElementName = function() {
  var startPos = this.start, startLoc = this.startLoc;
  var node = this.jsx_parseNamespacedName();
  if (this.type === tt.dot && node.type === 'JSXNamespacedName' && !this.options.plugins.jsx.allowNamespacedObjects) {
    this.unexpected();
  }
  while (this.eat(tt.dot)) {
    var newNode = this.startNodeAt(startPos, startLoc);
    newNode.object = node;
    newNode.property = this.jsx_parseIdentifier();
    node = this.finishNode(newNode, 'JSXMemberExpression');
  }
  return node;
};

// Parses any type of JSX attribute value.

pp.jsx_parseAttributeValue = function() {
  switch (this.type) {
  case tt.braceL:
    var node = this.jsx_parseExpressionContainer();
    if (node.expression.type === 'JSXEmptyExpression')
      this.raise(node.start, 'JSX attributes must only be assigned a non-empty expression');
    return node;

  case tt.jsxTagStart:
  case tt.string:
    return this.parseExprAtom();

  default:
    this.raise(this.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.jsx_parseEmptyExpression = 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.jsx_parseExpressionContainer = function() {
  var node = this.startNode();
  this.next();
  node.expression = this.type === tt.braceR
    ? this.jsx_parseEmptyExpression()
    : this.parseExpression();
  this.expect(tt.braceR);
  return this.finishNode(node, 'JSXExpressionContainer');
};

// Parses following JSX attribute name-value pair.

pp.jsx_parseAttribute = function() {
  var node = this.startNode();
  if (this.eat(tt.braceL)) {
    this.expect(tt.ellipsis);
    node.argument = this.parseMaybeAssign();
    this.expect(tt.braceR);
    return this.finishNode(node, 'JSXSpreadAttribute');
  }
  node.name = this.jsx_parseNamespacedName();
  node.value = this.eat(tt.eq) ? this.jsx_parseAttributeValue() : null;
  return this.finishNode(node, 'JSXAttribute');
};

// Parses JSX opening tag starting after '<'.

pp.jsx_parseOpeningElementAt = function(startPos, startLoc) {
  var node = this.startNodeAt(startPos, startLoc);
  node.attributes = [];
  node.name = this.jsx_parseElementName();
  while (this.type !== tt.slash && this.type !== tt.jsxTagEnd)
    node.attributes.push(this.jsx_parseAttribute());
  node.selfClosing = this.eat(tt.slash);
  this.expect(tt.jsxTagEnd);
  return this.finishNode(node, 'JSXOpeningElement');
};

// Parses JSX closing tag starting after '</'.

pp.jsx_parseClosingElementAt = function(startPos, startLoc) {
  var node = this.startNodeAt(startPos, startLoc);
  node.name = this.jsx_parseElementName();
  this.expect(tt.jsxTagEnd);
  return this.finishNode(node, 'JSXClosingElement');
};

// Parses entire JSX element, including it's opening tag
// (starting after '<'), attributes, contents and closing tag.

pp.jsx_parseElementAt = function(startPos, startLoc) {
  var node = this.startNodeAt(startPos, startLoc);
  var children = [];
  var openingElement = this.jsx_parseOpeningElementAt(startPos, startLoc);
  var closingElement = null;

  if (!openingElement.selfClosing) {
    contents: for (;;) {
      switch (this.type) {
      case tt.jsxTagStart:
        startPos = this.start; startLoc = this.startLoc;
        this.next();
        if (this.eat(tt.slash)) {
          closingElement = this.jsx_parseClosingElementAt(startPos, startLoc);
          break contents;
        }
        children.push(this.jsx_parseElementAt(startPos, startLoc));
        break;

      case tt.jsxText:
        children.push(this.parseExprAtom());
        break;

      case tt.braceL:
        children.push(this.jsx_parseExpressionContainer());
        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.type === tt.relational && this.value === "<") {
    this.raise(this.start, "Adjacent JSX elements must be wrapped in an enclosing tag");
  }
  return this.finishNode(node, 'JSXElement');
};

// Parses entire JSX element from current position.

pp.jsx_parseElement = function() {
  var startPos = this.start, startLoc = this.startLoc;
  this.next();
  return this.jsx_parseElementAt(startPos, startLoc);
};

acorn.plugins.jsx = function(instance, opts) {
  if (!opts) {
    return;
  }

  if (typeof opts !== 'object') {
    opts = {};
  }

  instance.options.plugins.jsx = {
    allowNamespaces: opts.allowNamespaces !== false,
    allowNamespacedObjects: !!opts.allowNamespacedObjects
  };

  instance.extend('parseExprAtom', function(inner) {
    return function(refShortHandDefaultPos) {
      if (this.type === tt.jsxText)
        return this.parseLiteral(this.value);
      else if (this.type === tt.jsxTagStart)
        return this.jsx_parseElement();
      else
        return inner.call(this, refShortHandDefaultPos);
    };
  });

  instance.extend('readToken', function(inner) {
    return function(code) {
      var context = this.curContext();

      if (context === tc.j_expr) return this.jsx_readToken();

      if (context === tc.j_oTag || context === tc.j_cTag) {
        if (acorn.isIdentifierStart(code)) return this.jsx_readWord();

        if (code == 62) {
          ++this.pos;
          return this.finishToken(tt.jsxTagEnd);
        }

        if ((code === 34 || code === 39) && context == tc.j_oTag)
          return this.jsx_readString(code);
      }

      if (code === 60 && this.exprAllowed) {
        ++this.pos;
        return this.finishToken(tt.jsxTagStart);
      }
      return inner.call(this, code);
    };
  });

  instance.extend('updateContext', function(inner) {
    return function(prevType) {
      if (this.type == tt.braceL) {
        var curContext = this.curContext();
        if (curContext == tc.j_oTag) this.context.push(tc.b_expr);
        else if (curContext == tc.j_expr) this.context.push(tc.b_tmpl);
        else inner.call(this, prevType);
        this.exprAllowed = true;
      } else if (this.type === tt.slash && prevType === tt.jsxTagStart) {
        this.context.length -= 2; // do not consider JSX expr -> JSX open tag -> ... anymore
        this.context.push(tc.j_cTag); // reconsider as closing tag context
        this.exprAllowed = false;
      } else {
        return inner.call(this, prevType);
      }
    };
  });
};

return acorn;

};

},{“./xhtml”:2}],2:[function(require,module,exports){ module.exports = {

quot: '\u0022',
amp: '&',
apos: '\u0027',
lt: '<',
gt: '>',
nbsp: '\u00A0',
iexcl: '\u00A1',
cent: '\u00A2',
pound: '\u00A3',
curren: '\u00A4',
yen: '\u00A5',
brvbar: '\u00A6',
sect: '\u00A7',
uml: '\u00A8',
copy: '\u00A9',
ordf: '\u00AA',
laquo: '\u00AB',
not: '\u00AC',
shy: '\u00AD',
reg: '\u00AE',
macr: '\u00AF',
deg: '\u00B0',
plusmn: '\u00B1',
sup2: '\u00B2',
sup3: '\u00B3',
acute: '\u00B4',
micro: '\u00B5',
para: '\u00B6',
middot: '\u00B7',
cedil: '\u00B8',
sup1: '\u00B9',
ordm: '\u00BA',
raquo: '\u00BB',
frac14: '\u00BC',
frac12: '\u00BD',
frac34: '\u00BE',
iquest: '\u00BF',
Agrave: '\u00C0',
Aacute: '\u00C1',
Acirc: '\u00C2',
Atilde: '\u00C3',
Auml: '\u00C4',
Aring: '\u00C5',
AElig: '\u00C6',
Ccedil: '\u00C7',
Egrave: '\u00C8',
Eacute: '\u00C9',
Ecirc: '\u00CA',
Euml: '\u00CB',
Igrave: '\u00CC',
Iacute: '\u00CD',
Icirc: '\u00CE',
Iuml: '\u00CF',
ETH: '\u00D0',
Ntilde: '\u00D1',
Ograve: '\u00D2',
Oacute: '\u00D3',
Ocirc: '\u00D4',
Otilde: '\u00D5',
Ouml: '\u00D6',
times: '\u00D7',
Oslash: '\u00D8',
Ugrave: '\u00D9',
Uacute: '\u00DA',
Ucirc: '\u00DB',
Uuml: '\u00DC',
Yacute: '\u00DD',
THORN: '\u00DE',
szlig: '\u00DF',
agrave: '\u00E0',
aacute: '\u00E1',
acirc: '\u00E2',
atilde: '\u00E3',
auml: '\u00E4',
aring: '\u00E5',
aelig: '\u00E6',
ccedil: '\u00E7',
egrave: '\u00E8',
eacute: '\u00E9',
ecirc: '\u00EA',
euml: '\u00EB',
igrave: '\u00EC',
iacute: '\u00ED',
icirc: '\u00EE',
iuml: '\u00EF',
eth: '\u00F0',
ntilde: '\u00F1',
ograve: '\u00F2',
oacute: '\u00F3',
ocirc: '\u00F4',
otilde: '\u00F5',
ouml: '\u00F6',
divide: '\u00F7',
oslash: '\u00F8',
ugrave: '\u00F9',
uacute: '\u00FA',
ucirc: '\u00FB',
uuml: '\u00FC',
yacute: '\u00FD',
thorn: '\u00FE',
yuml: '\u00FF',
OElig: '\u0152',
oelig: '\u0153',
Scaron: '\u0160',
scaron: '\u0161',
Yuml: '\u0178',
fnof: '\u0192',
circ: '\u02C6',
tilde: '\u02DC',
Alpha: '\u0391',
Beta: '\u0392',
Gamma: '\u0393',
Delta: '\u0394',
Epsilon: '\u0395',
Zeta: '\u0396',
Eta: '\u0397',
Theta: '\u0398',
Iota: '\u0399',
Kappa: '\u039A',
Lambda: '\u039B',
Mu: '\u039C',
Nu: '\u039D',
Xi: '\u039E',
Omicron: '\u039F',
Pi: '\u03A0',
Rho: '\u03A1',
Sigma: '\u03A3',
Tau: '\u03A4',
Upsilon: '\u03A5',
Phi: '\u03A6',
Chi: '\u03A7',
Psi: '\u03A8',
Omega: '\u03A9',
alpha: '\u03B1',
beta: '\u03B2',
gamma: '\u03B3',
delta: '\u03B4',
epsilon: '\u03B5',
zeta: '\u03B6',
eta: '\u03B7',
theta: '\u03B8',
iota: '\u03B9',
kappa: '\u03BA',
lambda: '\u03BB',
mu: '\u03BC',
nu: '\u03BD',
xi: '\u03BE',
omicron: '\u03BF',
pi: '\u03C0',
rho: '\u03C1',
sigmaf: '\u03C2',
sigma: '\u03C3',
tau: '\u03C4',
upsilon: '\u03C5',
phi: '\u03C6',
chi: '\u03C7',
psi: '\u03C8',
omega: '\u03C9',
thetasym: '\u03D1',
upsih: '\u03D2',
piv: '\u03D6',
ensp: '\u2002',
emsp: '\u2003',
thinsp: '\u2009',
zwnj: '\u200C',
zwj: '\u200D',
lrm: '\u200E',
rlm: '\u200F',
ndash: '\u2013',
mdash: '\u2014',
lsquo: '\u2018',
rsquo: '\u2019',
sbquo: '\u201A',
ldquo: '\u201C',
rdquo: '\u201D',
bdquo: '\u201E',
dagger: '\u2020',
Dagger: '\u2021',
bull: '\u2022',
hellip: '\u2026',
permil: '\u2030',
prime: '\u2032',
Prime: '\u2033',
lsaquo: '\u2039',
rsaquo: '\u203A',
oline: '\u203E',
frasl: '\u2044',
euro: '\u20AC',
image: '\u2111',
weierp: '\u2118',
real: '\u211C',
trade: '\u2122',
alefsym: '\u2135',
larr: '\u2190',
uarr: '\u2191',
rarr: '\u2192',
darr: '\u2193',
harr: '\u2194',
crarr: '\u21B5',
lArr: '\u21D0',
uArr: '\u21D1',
rArr: '\u21D2',
dArr: '\u21D3',
hArr: '\u21D4',
forall: '\u2200',
part: '\u2202',
exist: '\u2203',
empty: '\u2205',
nabla: '\u2207',
isin: '\u2208',
notin: '\u2209',
ni: '\u220B',
prod: '\u220F',
sum: '\u2211',
minus: '\u2212',
lowast: '\u2217',
radic: '\u221A',
prop: '\u221D',
infin: '\u221E',
ang: '\u2220',
and: '\u2227',
or: '\u2228',
cap: '\u2229',
cup: '\u222A',
'int': '\u222B',
there4: '\u2234',
sim: '\u223C',
cong: '\u2245',
asymp: '\u2248',
ne: '\u2260',
equiv: '\u2261',
le: '\u2264',
ge: '\u2265',
sub: '\u2282',
sup: '\u2283',
nsub: '\u2284',
sube: '\u2286',
supe: '\u2287',
oplus: '\u2295',
otimes: '\u2297',
perp: '\u22A5',
sdot: '\u22C5',
lceil: '\u2308',
rceil: '\u2309',
lfloor: '\u230A',
rfloor: '\u230B',
lang: '\u2329',
rang: '\u232A',
loz: '\u25CA',
spades: '\u2660',
clubs: '\u2663',
hearts: '\u2665',
diams: '\u2666'

};

},{}],3:[function(require,module,exports){ (function (global){ (function(f){if(typeof exports===“object”&&typeof module!==“undefined”){module.exports=f()}else if(typeof define===“function”&&define.amd){define([],f)}else{var g;if(typeof window!==“undefined”){g=window}else if(typeof global!==“undefined”){g=global}else if(typeof self!==“undefined”){g=self}else{g=this}g.acorn = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n){if(!t){var a=typeof require==“function”&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(“Cannot find module ‘”o“’”);throw f.code=“MODULE_NOT_FOUND”,f}var l=n={exports:{}};t[0].call(l.exports,function(e){var n=t[1];return s(n?n:e)},l,l.exports,e,t,n,r)}return n.exports}var i=typeof require==“function”&&require;for(var o=0;o);return s})({1:[function(dereq,module,exports){ // A recursive descent parser operates by defining functions for all // syntactic elements, and recursively calling those, each function // advancing the input stream and returning an AST node. Precedence // of constructs (for example, the fact that ‘!x` means `!(x)` // instead of `(!x)` 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` already parsed, and wraps // that in the unary operator node. // // Acorn uses an [operator precedence parser] 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]: en.wikipedia.org/wiki/Operator-precedence_parser

“use strict”;

var _tokentype = dereq(“./tokentype”);

var _state = dereq(“./state”);

var _parseutil = dereq(“./parseutil”);

var pp = _state.Parser.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.

pp.checkPropClash = function (prop, propHash) {

if (this.options.ecmaVersion >= 6 && (prop.computed || prop.method || prop.shorthand)) return;
var key = prop.key;var name = undefined;
switch (key.type) {
  case "Identifier":
    name = key.name;break;
  case "Literal":
    name = String(key.value);break;
  default:
    return;
}
var kind = prop.kind;

if (this.options.ecmaVersion >= 6) {
  if (name === "__proto__" && kind === "init") {
    if (propHash.proto) this.raiseRecoverable(key.start, "Redefinition of __proto__ property");
    propHash.proto = true;
  }
  return;
}
name = "$" + name;
var other = propHash[name];
if (other) {
  var isGetSet = kind !== "init";
  if ((this.strict || isGetSet) && other[kind] || !(isGetSet ^ other.init)) this.raiseRecoverable(key.start, "Redefinition of property");
} else {
  other = propHash[name] = {
    init: false,
    get: false,
    set: false
  };
}
other[kind] = 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, refDestructuringErrors) {

var startPos = this.start,
    startLoc = this.startLoc;
var expr = this.parseMaybeAssign(noIn, refDestructuringErrors);
if (this.type === _tokentype.types.comma) {
  var node = this.startNodeAt(startPos, startLoc);
  node.expressions = [expr];
  while (this.eat(_tokentype.types.comma)) node.expressions.push(this.parseMaybeAssign(noIn, refDestructuringErrors));
  return this.finishNode(node, "SequenceExpression");
}
return expr;

};

// Parse an assignment expression. This includes applications of // operators like ‘+=`.

pp.parseMaybeAssign = function (noIn, refDestructuringErrors, afterLeftParse) {

if (this.inGenerator && this.isContextual("yield")) return this.parseYield();

var ownDestructuringErrors = false;
if (!refDestructuringErrors) {
  refDestructuringErrors = new _parseutil.DestructuringErrors();
  ownDestructuringErrors = true;
}
var startPos = this.start,
    startLoc = this.startLoc;
if (this.type == _tokentype.types.parenL || this.type == _tokentype.types.name) this.potentialArrowAt = this.start;
var left = this.parseMaybeConditional(noIn, refDestructuringErrors);
if (afterLeftParse) left = afterLeftParse.call(this, left, startPos, startLoc);
if (this.type.isAssign) {
  this.checkPatternErrors(refDestructuringErrors, true);
  if (!ownDestructuringErrors) _parseutil.DestructuringErrors.call(refDestructuringErrors);
  var node = this.startNodeAt(startPos, startLoc);
  node.operator = this.value;
  node.left = this.type === _tokentype.types.eq ? this.toAssignable(left) : left;
  refDestructuringErrors.shorthandAssign = 0; // reset because shorthand default was used correctly
  this.checkLVal(left);
  this.next();
  node.right = this.parseMaybeAssign(noIn);
  return this.finishNode(node, "AssignmentExpression");
} else {
  if (ownDestructuringErrors) this.checkExpressionErrors(refDestructuringErrors, true);
}
return left;

};

// Parse a ternary conditional (‘?:`) operator.

pp.parseMaybeConditional = function (noIn, refDestructuringErrors) {

var startPos = this.start,
    startLoc = this.startLoc;
var expr = this.parseExprOps(noIn, refDestructuringErrors);
if (this.checkExpressionErrors(refDestructuringErrors)) return expr;
if (this.eat(_tokentype.types.question)) {
  var node = this.startNodeAt(startPos, startLoc);
  node.test = expr;
  node.consequent = this.parseMaybeAssign();
  this.expect(_tokentype.types.colon);
  node.alternate = this.parseMaybeAssign(noIn);
  return this.finishNode(node, "ConditionalExpression");
}
return expr;

};

// Start the precedence parser.

pp.parseExprOps = function (noIn, refDestructuringErrors) {

var startPos = this.start,
    startLoc = this.startLoc;
var expr = this.parseMaybeUnary(refDestructuringErrors, false);
if (this.checkExpressionErrors(refDestructuringErrors)) return expr;
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.type.binop;
if (prec != null && (!noIn || this.type !== _tokentype.types._in)) {
  if (prec > minPrec) {
    var logical = this.type === _tokentype.types.logicalOR || this.type === _tokentype.types.logicalAND;
    var op = this.value;
    this.next();
    var startPos = this.start,
        startLoc = this.startLoc;
    var right = this.parseExprOp(this.parseMaybeUnary(null, false), startPos, startLoc, prec, noIn);
    var node = this.buildBinary(leftStartPos, leftStartLoc, left, right, op, logical);
    return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, noIn);
  }
}
return left;

};

pp.buildBinary = function (startPos, startLoc, left, right, op, logical) {

var node = this.startNodeAt(startPos, startLoc);
node.left = left;
node.operator = op;
node.right = right;
return this.finishNode(node, logical ? "LogicalExpression" : "BinaryExpression");

};

// Parse unary operators, both prefix and postfix.

pp.parseMaybeUnary = function (refDestructuringErrors, sawUnary) {

var startPos = this.start,
    startLoc = this.startLoc,
    expr = undefined;
if (this.type.prefix) {
  var node = this.startNode(),
      update = this.type === _tokentype.types.incDec;
  node.operator = this.value;
  node.prefix = true;
  this.next();
  node.argument = this.parseMaybeUnary(null, true);
  this.checkExpressionErrors(refDestructuringErrors, true);
  if (update) this.checkLVal(node.argument);else if (this.strict && node.operator === "delete" && node.argument.type === "Identifier") this.raiseRecoverable(node.start, "Deleting local variable in strict mode");else sawUnary = true;
  expr = this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression");
} else {
  expr = this.parseExprSubscripts(refDestructuringErrors);
  if (this.checkExpressionErrors(refDestructuringErrors)) return expr;
  while (this.type.postfix && !this.canInsertSemicolon()) {
    var node = this.startNodeAt(startPos, startLoc);
    node.operator = this.value;
    node.prefix = false;
    node.argument = expr;
    this.checkLVal(expr);
    this.next();
    expr = this.finishNode(node, "UpdateExpression");
  }
}

if (!sawUnary && this.eat(_tokentype.types.starstar)) return this.buildBinary(startPos, startLoc, expr, this.parseMaybeUnary(null, false), "**", false);else return expr;

};

// Parse call, dot, and ‘[]`-subscript expressions.

pp.parseExprSubscripts = function (refDestructuringErrors) {

var startPos = this.start,
    startLoc = this.startLoc;
var expr = this.parseExprAtom(refDestructuringErrors);
var skipArrowSubscripts = expr.type === "ArrowFunctionExpression" && this.input.slice(this.lastTokStart, this.lastTokEnd) !== ")";
if (this.checkExpressionErrors(refDestructuringErrors) || skipArrowSubscripts) return expr;
return this.parseSubscripts(expr, startPos, startLoc);

};

pp.parseSubscripts = function (base, startPos, startLoc, noCalls) {

for (;;) {
  if (this.eat(_tokentype.types.dot)) {
    var node = this.startNodeAt(startPos, startLoc);
    node.object = base;
    node.property = this.parseIdent(true);
    node.computed = false;
    base = this.finishNode(node, "MemberExpression");
  } else if (this.eat(_tokentype.types.bracketL)) {
    var node = this.startNodeAt(startPos, startLoc);
    node.object = base;
    node.property = this.parseExpression();
    node.computed = true;
    this.expect(_tokentype.types.bracketR);
    base = this.finishNode(node, "MemberExpression");
  } else if (!noCalls && this.eat(_tokentype.types.parenL)) {
    var node = this.startNodeAt(startPos, startLoc);
    node.callee = base;
    node.arguments = this.parseExprList(_tokentype.types.parenR, false);
    base = this.finishNode(node, "CallExpression");
  } else if (this.type === _tokentype.types.backQuote) {
    var node = this.startNodeAt(startPos, startLoc);
    node.tag = base;
    node.quasi = this.parseTemplate();
    base = this.finishNode(node, "TaggedTemplateExpression");
  } else {
    return base;
  }
}

};

// 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 (refDestructuringErrors) {

var node = undefined,
    canBeArrow = this.potentialArrowAt == this.start;
switch (this.type) {
  case _tokentype.types._super:
    if (!this.inFunction) this.raise(this.start, "'super' outside of function or class");

  case _tokentype.types._this:
    var type = this.type === _tokentype.types._this ? "ThisExpression" : "Super";
    node = this.startNode();
    this.next();
    return this.finishNode(node, type);

  case _tokentype.types.name:
    var startPos = this.start,
        startLoc = this.startLoc;
    var id = this.parseIdent(this.type !== _tokentype.types.name);
    if (canBeArrow && !this.canInsertSemicolon() && this.eat(_tokentype.types.arrow)) return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id]);
    return id;

  case _tokentype.types.regexp:
    var value = this.value;
    node = this.parseLiteral(value.value);
    node.regex = { pattern: value.pattern, flags: value.flags };
    return node;

  case _tokentype.types.num:case _tokentype.types.string:
    return this.parseLiteral(this.value);

  case _tokentype.types._null:case _tokentype.types._true:case _tokentype.types._false:
    node = this.startNode();
    node.value = this.type === _tokentype.types._null ? null : this.type === _tokentype.types._true;
    node.raw = this.type.keyword;
    this.next();
    return this.finishNode(node, "Literal");

  case _tokentype.types.parenL:
    return this.parseParenAndDistinguishExpression(canBeArrow);

  case _tokentype.types.bracketL:
    node = this.startNode();
    this.next();
    node.elements = this.parseExprList(_tokentype.types.bracketR, true, true, refDestructuringErrors);
    return this.finishNode(node, "ArrayExpression");

  case _tokentype.types.braceL:
    return this.parseObj(false, refDestructuringErrors);

  case _tokentype.types._function:
    node = this.startNode();
    this.next();
    return this.parseFunction(node, false);

  case _tokentype.types._class:
    return this.parseClass(this.startNode(), false);

  case _tokentype.types._new:
    return this.parseNew();

  case _tokentype.types.backQuote:
    return this.parseTemplate();

  default:
    this.unexpected();
}

};

pp.parseLiteral = function (value) {

var node = this.startNode();
node.value = value;
node.raw = this.input.slice(this.start, this.end);
this.next();
return this.finishNode(node, "Literal");

};

pp.parseParenExpression = function () {

this.expect(_tokentype.types.parenL);
var val = this.parseExpression();
this.expect(_tokentype.types.parenR);
return val;

};

pp.parseParenAndDistinguishExpression = function (canBeArrow) {

var startPos = this.start,
    startLoc = this.startLoc,
    val = undefined;
if (this.options.ecmaVersion >= 6) {
  this.next();

  var innerStartPos = this.start,
      innerStartLoc = this.startLoc;
  var exprList = [],
      first = true;
  var refDestructuringErrors = new _parseutil.DestructuringErrors(),
      spreadStart = undefined,
      innerParenStart = undefined;
  while (this.type !== _tokentype.types.parenR) {
    first ? first = false : this.expect(_tokentype.types.comma);
    if (this.type === _tokentype.types.ellipsis) {
      spreadStart = this.start;
      exprList.push(this.parseParenItem(this.parseRest()));
      break;
    } else {
      if (this.type === _tokentype.types.parenL && !innerParenStart) {
        innerParenStart = this.start;
      }
      exprList.push(this.parseMaybeAssign(false, refDestructuringErrors, this.parseParenItem));
    }
  }
  var innerEndPos = this.start,
      innerEndLoc = this.startLoc;
  this.expect(_tokentype.types.parenR);

  if (canBeArrow && !this.canInsertSemicolon() && this.eat(_tokentype.types.arrow)) {
    this.checkPatternErrors(refDestructuringErrors, true);
    if (innerParenStart) this.unexpected(innerParenStart);
    return this.parseParenArrowList(startPos, startLoc, exprList);
  }

  if (!exprList.length) this.unexpected(this.lastTokStart);
  if (spreadStart) this.unexpected(spreadStart);
  this.checkExpressionErrors(refDestructuringErrors, true);

  if (exprList.length > 1) {
    val = this.startNodeAt(innerStartPos, innerStartLoc);
    val.expressions = exprList;
    this.finishNodeAt(val, "SequenceExpression", innerEndPos, innerEndLoc);
  } else {
    val = exprList[0];
  }
} else {
  val = this.parseParenExpression();
}

if (this.options.preserveParens) {
  var par = this.startNodeAt(startPos, startLoc);
  par.expression = val;
  return this.finishNode(par, "ParenthesizedExpression");
} else {
  return val;
}

};

pp.parseParenItem = function (item) {

return item;

};

pp.parseParenArrowList = function (startPos, startLoc, exprList) {

return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList);

};

// 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 noCalls // argument to parseSubscripts to prevent it from consuming the // argument list.

var empty = [];

pp.parseNew = function () {

var node = this.startNode();
var meta = this.parseIdent(true);
if (this.options.ecmaVersion >= 6 && this.eat(_tokentype.types.dot)) {
  node.meta = meta;
  node.property = this.parseIdent(true);
  if (node.property.name !== "target") this.raiseRecoverable(node.property.start, "The only valid meta property for new is new.target");
  if (!this.inFunction) this.raiseRecoverable(node.start, "new.target can only be used in functions");
  return this.finishNode(node, "MetaProperty");
}
var startPos = this.start,
    startLoc = this.startLoc;
node.callee = this.parseSubscripts(this.parseExprAtom(), startPos, startLoc, true);
if (this.eat(_tokentype.types.parenL)) node.arguments = this.parseExprList(_tokentype.types.parenR, false);else node.arguments = empty;
return this.finishNode(node, "NewExpression");

};

// Parse template expression.

pp.parseTemplateElement = function () {

var elem = this.startNode();
elem.value = {
  raw: this.input.slice(this.start, this.end).replace(/\r\n?/g, '\n'),
  cooked: this.value
};
this.next();
elem.tail = this.type === _tokentype.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(_tokentype.types.dollarBraceL);
  node.expressions.push(this.parseExpression());
  this.expect(_tokentype.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, refDestructuringErrors) {

var node = this.startNode(),
    first = true,
    propHash = {};
node.properties = [];
this.next();
while (!this.eat(_tokentype.types.braceR)) {
  if (!first) {
    this.expect(_tokentype.types.comma);
    if (this.afterTrailingComma(_tokentype.types.braceR)) break;
  } else first = false;

  var prop = this.startNode(),
      isGenerator = undefined,
      startPos = undefined,
      startLoc = undefined;
  if (this.options.ecmaVersion >= 6) {
    prop.method = false;
    prop.shorthand = false;
    if (isPattern || refDestructuringErrors) {
      startPos = this.start;
      startLoc = this.startLoc;
    }
    if (!isPattern) isGenerator = this.eat(_tokentype.types.star);
  }
  this.parsePropertyName(prop);
  this.parsePropertyValue(prop, isPattern, isGenerator, startPos, startLoc, refDestructuringErrors);
  this.checkPropClash(prop, propHash);
  node.properties.push(this.finishNode(prop, "Property"));
}
return this.finishNode(node, isPattern ? "ObjectPattern" : "ObjectExpression");

};

pp.parsePropertyValue = function (prop, isPattern, isGenerator, startPos, startLoc, refDestructuringErrors) {

if (this.eat(_tokentype.types.colon)) {
  prop.value = isPattern ? this.parseMaybeDefault(this.start, this.startLoc) : this.parseMaybeAssign(false, refDestructuringErrors);
  prop.kind = "init";
} else if (this.options.ecmaVersion >= 6 && this.type === _tokentype.types.parenL) {
  if (isPattern) this.unexpected();
  prop.kind = "init";
  prop.method = true;
  prop.value = this.parseMethod(isGenerator);
} else if (this.options.ecmaVersion >= 5 && !prop.computed && prop.key.type === "Identifier" && (prop.key.name === "get" || prop.key.name === "set") && this.type != _tokentype.types.comma && this.type != _tokentype.types.braceR) {
  if (isGenerator || isPattern) this.unexpected();
  prop.kind = prop.key.name;
  this.parsePropertyName(prop);
  prop.value = this.parseMethod(false);
  var paramCount = prop.kind === "get" ? 0 : 1;
  if (prop.value.params.length !== paramCount) {
    var start = prop.value.start;
    if (prop.kind === "get") this.raiseRecoverable(start, "getter should have no params");else this.raiseRecoverable(start, "setter should have exactly one param");
  }
  if (prop.kind === "set" && prop.value.params[0].type === "RestElement") this.raiseRecoverable(prop.value.params[0].start, "Setter cannot use rest params");
} else if (this.options.ecmaVersion >= 6 && !prop.computed && prop.key.type === "Identifier") {
  if (this.keywords.test(prop.key.name) || (this.strict ? this.reservedWordsStrictBind : this.reservedWords).test(prop.key.name) || this.inGenerator && prop.key.name == "yield") this.raiseRecoverable(prop.key.start, "'" + prop.key.name + "' can not be used as shorthand property");
  prop.kind = "init";
  if (isPattern) {
    prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key);
  } else if (this.type === _tokentype.types.eq && refDestructuringErrors) {
    if (!refDestructuringErrors.shorthandAssign) refDestructuringErrors.shorthandAssign = this.start;
    prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key);
  } else {
    prop.value = prop.key;
  }
  prop.shorthand = true;
} else this.unexpected();

};

pp.parsePropertyName = function (prop) {

if (this.options.ecmaVersion >= 6) {
  if (this.eat(_tokentype.types.bracketL)) {
    prop.computed = true;
    prop.key = this.parseMaybeAssign();
    this.expect(_tokentype.types.bracketR);
    return prop.key;
  } else {
    prop.computed = false;
  }
}
return prop.key = this.type === _tokentype.types.num || this.type === _tokentype.types.string ? this.parseExprAtom() : this.parseIdent(true);

};

// Initialize empty function node.

pp.initFunction = function (node) {

node.id = null;
if (this.options.ecmaVersion >= 6) {
  node.generator = false;
  node.expression = false;
}

};

// Parse object or class method.

pp.parseMethod = function (isGenerator) {

var node = this.startNode(),
    oldInGen = this.inGenerator;
this.inGenerator = isGenerator;
this.initFunction(node);
this.expect(_tokentype.types.parenL);
node.params = this.parseBindingList(_tokentype.types.parenR, false, false);
if (this.options.ecmaVersion >= 6) node.generator = isGenerator;
this.parseFunctionBody(node, false);
this.inGenerator = oldInGen;
return this.finishNode(node, "FunctionExpression");

};

// Parse arrow function expression with given parameters.

pp.parseArrowExpression = function (node, params) {

var oldInGen = this.inGenerator;
this.inGenerator = false;
this.initFunction(node);
node.params = this.toAssignableList(params, true);
this.parseFunctionBody(node, true);
this.inGenerator = oldInGen;
return this.finishNode(node, "ArrowFunctionExpression");

};

// Parse function body and check parameters.

pp.parseFunctionBody = function (node, isArrowFunction) {

var isExpression = isArrowFunction && this.type !== _tokentype.types.braceL;

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.inFunction,
      oldLabels = this.labels;
  this.inFunction = true;this.labels = [];
  node.body = this.parseBlock(true);
  node.expression = false;
  this.inFunction = oldInFunc;this.labels = oldLabels;
}

// 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`.
if (this.strict || !isExpression && node.body.body.length && this.isUseStrict(node.body.body[0])) {
  var oldStrict = this.strict;
  this.strict = true;
  if (node.id) this.checkLVal(node.id, true);
  this.checkParams(node);
  this.strict = oldStrict;
} else if (isArrowFunction) {
  this.checkParams(node);
}

};

// Checks function params for various disallowed patterns such as using “eval” // or “arguments” and duplicate parameters.

pp.checkParams = function (node) {

var nameHash = {};
for (var i = 0; i < node.params.length; i++) {
  this.checkLVal(node.params[i], true, nameHash);
}

};

// 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, refDestructuringErrors) {

var elts = [],
    first = true;
while (!this.eat(close)) {
  if (!first) {
    this.expect(_tokentype.types.comma);
    if (allowTrailingComma && this.afterTrailingComma(close)) break;
  } else first = false;

  var elt = undefined;
  if (allowEmpty && this.type === _tokentype.types.comma) elt = null;else if (this.type === _tokentype.types.ellipsis) {
    elt = this.parseSpread(refDestructuringErrors);
    if (this.type === _tokentype.types.comma && refDestructuringErrors && !refDestructuringErrors.trailingComma) {
      refDestructuringErrors.trailingComma = this.lastTokStart;
    }
  } else elt = this.parseMaybeAssign(false, refDestructuringErrors);
  elts.push(elt);
}
return elts;

};

// Parse the next token as an identifier. If ‘liberal` is true (used // when parsing properties), it will also convert keywords into // identifiers.

pp.parseIdent = function (liberal) {

var node = this.startNode();
if (liberal && this.options.allowReserved == "never") liberal = false;
if (this.type === _tokentype.types.name) {
  if (!liberal && (this.strict ? this.reservedWordsStrict : this.reservedWords).test(this.value) && (this.options.ecmaVersion >= 6 || this.input.slice(this.start, this.end).indexOf("\\") == -1)) this.raiseRecoverable(this.start, "The keyword '" + this.value + "' is reserved");
  if (!liberal && this.inGenerator && this.value === "yield") this.raiseRecoverable(this.start, "Can not use 'yield' as identifier inside a generator");
  node.name = this.value;
} else if (liberal && this.type.keyword) {
  node.name = this.type.keyword;
} else {
  this.unexpected();
}
this.next();
return this.finishNode(node, "Identifier");

};

// Parses yield expression inside generator.

pp.parseYield = function () {

var node = this.startNode();
this.next();
if (this.type == _tokentype.types.semi || this.canInsertSemicolon() || this.type != _tokentype.types.star && !this.type.startsExpr) {
  node.delegate = false;
  node.argument = null;
} else {
  node.delegate = this.eat(_tokentype.types.star);
  node.argument = this.parseMaybeAssign();
}
return this.finishNode(node, "YieldExpression");

};

},{“./parseutil”:9,“./state”:10,“./tokentype”:14}],2:[function(dereq,module,exports){ // Reserved word lists for various dialects of the language

“use strict”;

exports.__esModule = true; exports.isIdentifierStart = isIdentifierStart; exports.isIdentifierChar = isIdentifierChar; var reservedWords = {

3: "abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",
5: "class enum extends super const export import",
6: "enum",
7: "enum",
strict: "implements interface let package private protected public static yield",
strictBind: "eval arguments"

};

exports.reservedWords = reservedWords; // And the keywords

var ecma5AndLessKeywords = “break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this”;

var keywords = {

5: ecma5AndLessKeywords,
6: ecma5AndLessKeywords + " const class extends export import super"

};

exports.keywords = keywords; // ## Character categories

// Big ugly regular expressions that match characters in the // whitespace, identifier, and identifier-start categories. These // are only applied when a character is found to actually have a // code point above 128. // Generated by ‘bin/generate-identifier-regex.js`.

var nonASCIIidentifierStartChars = “ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠ-ࢴऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿕ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞭꞰ-ꞷꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭥꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ”; var nonASCIIidentifierChars = “‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣣ-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఃా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഁ-ഃാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ංඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ູົຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭ᳲ-᳴᳸᳹᷀-᷵᷼-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-꣄꣐-꣙꣠-꣱꤀-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_”;

var nonASCIIidentifierStart = new RegExp(“[” + nonASCIIidentifierStartChars + “]”); var nonASCIIidentifier = new RegExp(“[” + nonASCIIidentifierStartChars + nonASCIIidentifierChars + “]”);

nonASCIIidentifierStartChars = nonASCIIidentifierChars = null;

// These are a run-length and offset encoded representation of the // >0xffff code points that are a valid part of identifiers. The // offset starts at 0x10000, and each pair of numbers represents an // offset to the next range, and then a size of the range. They were // generated by bin/generate-identifier-regex.js var astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 17, 26, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 99, 39, 9, 51, 157, 310, 10, 21, 11, 7, 153, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 26, 45, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 785, 52, 76, 44, 33, 24, 27, 35, 42, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 85, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 287, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 86, 25, 391, 63, 32, 0, 449, 56, 1288, 921, 103, 110, 18, 195, 2749, 1070, 4050, 582, 8634, 568, 8, 30, 114, 29, 19, 47, 17, 3, 32, 20, 6, 18, 881, 68, 12, 0, 67, 12, 16481, 1, 3071, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 4149, 196, 1340, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42710, 42, 4148, 12, 221, 3, 5761, 10591, 541]; var astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 1306, 2, 54, 14, 32, 9, 16, 3, 46, 10, 54, 9, 7, 2, 37, 13, 2, 9, 52, 0, 13, 2, 49, 13, 10, 2, 4, 9, 83, 11, 168, 11, 6, 9, 7, 3, 57, 0, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 316, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 423, 9, 20855, 9, 135, 4, 60, 6, 26, 9, 1016, 45, 17, 3, 19723, 1, 5319, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 3617, 6, 792618, 239];

// This has a complexity linear to the value of the code. The // assumption is that looking up astral identifier characters is // rare. function isInAstralSet(code, set) {

var pos = 0x10000;
for (var i = 0; i < set.length; i += 2) {
  pos += set[i];
  if (pos > code) return false;
  pos += set[i + 1];
  if (pos >= code) return true;
}

}

// Test whether a given character code starts an identifier.

function isIdentifierStart(code, astral) {

if (code < 65) return code === 36;
if (code < 91) return true;
if (code < 97) return code === 95;
if (code < 123) return true;
if (code <= 0xffff) return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code));
if (astral === false) return false;
return isInAstralSet(code, astralIdentifierStartCodes);

}

// Test whether a given character is part of an identifier.

function isIdentifierChar(code, astral) {

if (code < 48) return code === 36;
if (code < 58) return true;
if (code < 65) return false;
if (code < 91) return true;
if (code < 97) return code === 95;
if (code < 123) return true;
if (code <= 0xffff) return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code));
if (astral === false) return false;
return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes);

}

},{}],3:[function(dereq,module,exports){ // Acorn is a tiny, fast JavaScript parser written in JavaScript. // // Acorn was written by Marijn Haverbeke, Ingvar Stepanyan, and // various contributors and released under an MIT license. // // Git repositories for Acorn are available at // // marijnhaverbeke.nl/git/acorn // github.com/ternjs/acorn.git // // Please use the [github bug tracker] to report issues. // // [ghbt]: github.com/ternjs/acorn/issues // // This file defines the main parser interface. The library also comes // with a [error-tolerant parser] and an // [abstract syntax tree walker], defined in other files. // // [dammit]: acorn_loose.js // [walk]: util/walk.js

“use strict”;

exports.__esModule = true; exports.parse = parse; exports.parseExpressionAt = parseExpressionAt; exports.tokenizer = tokenizer;

var _state = dereq(“./state”);

dereq(“./parseutil”);

dereq(“./statement”);

dereq(“./lval”);

dereq(“./expression”);

dereq(“./location”);

exports.Parser = _state.Parser; exports.plugins = _state.plugins;

var _options = dereq(“./options”);

exports.defaultOptions = _options.defaultOptions;

var _locutil = dereq(“./locutil”);

exports.Position = _locutil.Position; exports.SourceLocation = _locutil.SourceLocation; exports.getLineInfo = _locutil.getLineInfo;

var _node = dereq(“./node”);

exports.Node = _node.Node;

var _tokentype = dereq(“./tokentype”);

exports.TokenType = _tokentype.TokenType; exports.tokTypes = _tokentype.types;

var _tokencontext = dereq(“./tokencontext”);

exports.TokContext = _tokencontext.TokContext; exports.tokContexts = _tokencontext.types;

var _identifier = dereq(“./identifier”);

exports.isIdentifierChar = _identifier.isIdentifierChar; exports.isIdentifierStart = _identifier.isIdentifierStart;

var _tokenize = dereq(“./tokenize”);

exports.Token = _tokenize.Token;

var _whitespace = dereq(“./whitespace”);

exports.isNewLine = _whitespace.isNewLine; exports.lineBreak = _whitespace.lineBreak; exports.lineBreakG = _whitespace.lineBreakG; var version = “3.1.0”;

exports.version = version; // The main exported interface (under ‘self.acorn` when in the // browser) is a `parse` function that takes a code string and // returns an abstract syntax tree as specified by [Mozilla parser // API]. // // [api]: developer.mozilla.org/en-US/docs/SpiderMonkey/Parser_API

function parse(input, options) {

return new _state.Parser(options, input).parse();

}

// This function tries to parse a single expression at a given // offset in a string. Useful for parsing mixed-language formats // that embed JavaScript expressions.

function parseExpressionAt(input, pos, options) {

var p = new _state.Parser(options, input, pos);
p.nextToken();
return p.parseExpression();

}

// Acorn is organized as a tokenizer and a recursive-descent parser. // The ‘tokenizer` export provides an interface to the tokenizer.

function tokenizer(input, options) {

return new _state.Parser(options, input);

}

},{“./expression”:1,“./identifier”:2,“./location”:4,“./locutil”:5,“./lval”:6,“./node”:7,“./options”:8,“./parseutil”:9,“./state”:10,“./statement”:11,“./tokencontext”:12,“./tokenize”:13,“./tokentype”:14,“./whitespace”:16}],4:[function(dereq,module,exports){ “use strict”;

var _state = dereq(“./state”);

var _locutil = dereq(“./locutil”);

var pp = _state.Parser.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 = _locutil.getLineInfo(this.input, pos);
message += " (" + loc.line + ":" + loc.column + ")";
var err = new SyntaxError(message);
err.pos = pos;err.loc = loc;err.raisedAt = this.pos;
throw err;

};

pp.raiseRecoverable = pp.raise;

pp.curPosition = function () {

if (this.options.locations) {
  return new _locutil.Position(this.curLine, this.pos - this.lineStart);
}

};

},{“./locutil”:5,“./state”:10}],5:[function(dereq,module,exports){ “use strict”;

exports.__esModule = true; exports.getLineInfo = getLineInfo;

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(“Cannot call a class as a function”); } }

var _whitespace = dereq(“./whitespace”);

// These are used when ‘options.locations` is on, for the // `startLoc` and `endLoc` properties.

var Position = (function () {

function Position(line, col) {
  _classCallCheck(this, Position);

  this.line = line;
  this.column = col;
}

Position.prototype.offset = function offset(n) {
  return new Position(this.line, this.column + n);
};

return Position;

})();

exports.Position = Position;

var SourceLocation = function SourceLocation(p, start, end) {

_classCallCheck(this, SourceLocation);

this.start = start;
this.end = end;
if (p.sourceFile !== null) this.source = p.sourceFile;

}

// The ‘getLineInfo` function is mostly useful when the // `locations` option is off (for performance reasons) and you // want to find the line/column position for a given character // offset. `input` should be the code string that the offset refers // into.

;

exports.SourceLocation = SourceLocation;

function getLineInfo(input, offset) {

for (var line = 1, cur = 0;;) {
  _whitespace.lineBreakG.lastIndex = cur;
  var match = _whitespace.lineBreakG.exec(input);
  if (match && match.index < offset) {
    ++line;
    cur = match.index + match[0].length;
  } else {
    return new Position(line, offset - cur);
  }
}

}

},{“./whitespace”:16}],6:[function(dereq,module,exports){ “use strict”;

var _tokentype = dereq(“./tokentype”);

var _state = dereq(“./state”);

var _util = dereq(“./util”);

var pp = _state.Parser.prototype;

// Convert existing expression atom to assignable pattern // if possible.

pp.toAssignable = function (node, isBinding) {

if (this.options.ecmaVersion >= 6 && node) {
  switch (node.type) {
    case "Identifier":
    case "ObjectPattern":
    case "ArrayPattern":
      break;

    case "ObjectExpression":
      node.type = "ObjectPattern";
      for (var i = 0; i < node.properties.length; i++) {
        var prop = node.properties[i];
        if (prop.kind !== "init") this.raise(prop.key.start, "Object pattern can't contain getter or setter");
        this.toAssignable(prop.value, isBinding);
      }
      break;

    case "ArrayExpression":
      node.type = "ArrayPattern";
      this.toAssignableList(node.elements, isBinding);
      break;

    case "AssignmentExpression":
      if (node.operator === "=") {
        node.type = "AssignmentPattern";
        delete node.operator;
        // falls through to AssignmentPattern
      } else {
          this.raise(node.left.end, "Only '=' operator can be used for specifying default value.");
          break;
        }

    case "AssignmentPattern":
      if (node.right.type === "YieldExpression") this.raise(node.right.start, "Yield expression cannot be a default value");
      break;

    case "ParenthesizedExpression":
      node.expression = this.toAssignable(node.expression, isBinding);
      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;
  }

  if (isBinding && last.type === "RestElement" && last.argument.type !== "Identifier") this.unexpected(last.argument.start);
}
for (var i = 0; i < end; i++) {
  var elt = exprList[i];
  if (elt) this.toAssignable(elt, isBinding);
}
return exprList;

};

// Parses spread element.

pp.parseSpread = function (refDestructuringErrors) {

var node = this.startNode();
this.next();
node.argument = this.parseMaybeAssign(refDestructuringErrors);
return this.finishNode(node, "SpreadElement");

};

pp.parseRest = function (allowNonIdent) {

var node = this.startNode();
this.next();

// RestElement inside of a function parameter must be an identifier
if (allowNonIdent) node.argument = this.type === _tokentype.types.name ? this.parseIdent() : this.unexpected();else node.argument = this.type === _tokentype.types.name || this.type === _tokentype.types.bracketL ? this.parseBindingAtom() : this.unexpected();

return this.finishNode(node, "RestElement");

};

// Parses lvalue (assignable) atom.

pp.parseBindingAtom = function () {

if (this.options.ecmaVersion < 6) return this.parseIdent();
switch (this.type) {
  case _tokentype.types.name:
    return this.parseIdent();

  case _tokentype.types.bracketL:
    var node = this.startNode();
    this.next();
    node.elements = this.parseBindingList(_tokentype.types.bracketR, true, true);
    return this.finishNode(node, "ArrayPattern");

  case _tokentype.types.braceL:
    return this.parseObj(true);

  default:
    this.unexpected();
}

};

pp.parseBindingList = function (close, allowEmpty, allowTrailingComma, allowNonIdent) {

var elts = [],
    first = true;
while (!this.eat(close)) {
  if (first) first = false;else this.expect(_tokentype.types.comma);
  if (allowEmpty && this.type === _tokentype.types.comma) {
    elts.push(null);
  } else if (allowTrailingComma && this.afterTrailingComma(close)) {
    break;
  } else if (this.type === _tokentype.types.ellipsis) {
    var rest = this.parseRest(allowNonIdent);
    this.parseBindingListItem(rest);
    elts.push(rest);
    if (this.type === _tokentype.types.comma) this.raise(this.start, "Comma is not permitted after the rest element");
    this.expect(close);
    break;
  } else {
    var elem = this.parseMaybeDefault(this.start, this.startLoc);
    this.parseBindingListItem(elem);
    elts.push(elem);
  }
}
return elts;

};

pp.parseBindingListItem = function (param) {

return param;

};

// Parses assignment pattern around given atom if possible.

pp.parseMaybeDefault = function (startPos, startLoc, left) {

left = left || this.parseBindingAtom();
if (this.options.ecmaVersion < 6 || !this.eat(_tokentype.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.strict && this.reservedWordsStrictBind.test(expr.name)) this.raiseRecoverable(expr.start, (isBinding ? "Binding " : "Assigning to ") + expr.name + " in strict mode");
    if (checkClashes) {
      if (_util.has(checkClashes, expr.name)) this.raiseRecoverable(expr.start, "Argument name clash");
      checkClashes[expr.name] = true;
    }
    break;

  case "MemberExpression":
    if (isBinding) this.raiseRecoverable(expr.start, (isBinding ? "Binding" : "Assigning to") + " member expression");
    break;

  case "ObjectPattern":
    for (var i = 0; i < expr.properties.length; i++) {
      this.checkLVal(expr.properties[i].value, isBinding, checkClashes);
    }break;

  case "ArrayPattern":
    for (var i = 0; i < expr.elements.length; i++) {
      var elem = expr.elements[i];
      if (elem) this.checkLVal(elem, isBinding, checkClashes);
    }
    break;

  case "AssignmentPattern":
    this.checkLVal(expr.left, isBinding, checkClashes);
    break;

  case "RestElement":
    this.checkLVal(expr.argument, isBinding, checkClashes);
    break;

  case "ParenthesizedExpression":
    this.checkLVal(expr.expression, isBinding, checkClashes);
    break;

  default:
    this.raise(expr.start, (isBinding ? "Binding" : "Assigning to") + " rvalue");
}

};

},{“./state”:10,“./tokentype”:14,“./util”:15}],7:[function(dereq,module,exports){ “use strict”;

exports.__esModule = true;

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(“Cannot call a class as a function”); } }

var _state = dereq(“./state”);

var _locutil = dereq(“./locutil”);

var Node = function Node(parser, pos, loc) {

_classCallCheck(this, Node);

this.type = "";
this.start = pos;
this.end = 0;
if (parser.options.locations) this.loc = new _locutil.SourceLocation(parser, loc);
if (parser.options.directSourceFile) this.sourceFile = parser.options.directSourceFile;
if (parser.options.ranges) this.range = [pos, 0];

}

// Start an AST node, attaching a start offset.

;

exports.Node = Node; var pp = _state.Parser.prototype;

pp.startNode = function () {

return new Node(this, this.start, this.startLoc);

};

pp.startNodeAt = function (pos, loc) {

return new Node(this, pos, loc);

};

// Finish an AST node, adding ‘type` and `end` properties.

function finishNodeAt(node, type, pos, loc) {

node.type = type;
node.end = pos;
if (this.options.locations) node.loc.end = loc;
if (this.options.ranges) node.range[1] = pos;
return node;

}

pp.finishNode = function (node, type) {

return finishNodeAt.call(this, node, type, this.lastTokEnd, this.lastTokEndLoc);

};

// Finish node at given position

pp.finishNodeAt = function (node, type, pos, loc) {

return finishNodeAt.call(this, node, type, pos, loc);

};

},{“./locutil”:5,“./state”:10}],8:[function(dereq,module,exports){ “use strict”;

exports.__esModule = true; exports.getOptions = getOptions;

var _util = dereq(“./util”);

var _locutil = dereq(“./locutil”);

// A second optional argument can be given to further configure // the parser process. These options are recognized:

var defaultOptions = {

// `ecmaVersion` indicates the ECMAScript version to parse. Must
// be either 3, or 5, or 6. This influences support for strict
// mode, the set of reserved words, support for getters and
// setters and other features. The default is 6.
ecmaVersion: 6,
// Source type ("script" or "module") for different semantics
sourceType: "script",
// `onInsertedSemicolon` can be a callback that will be called
// when a semicolon is automatically inserted. It will be passed
// th position of the comma as an offset, and if `locations` is
// enabled, it is given the location as a `{line, column}` object
// as second argument.
onInsertedSemicolon: null,
// `onTrailingComma` is similar to `onInsertedSemicolon`, but for
// trailing commas.
onTrailingComma: null,
// By default, reserved words are only enforced if ecmaVersion >= 5.
// Set `allowReserved` to a boolean value to explicitly turn this on
// an off. When this option has the value "never", reserved words
// and keywords can also not be used as property names.
allowReserved: null,
// When enabled, a return at the top level is not considered an
// error.
allowReturnOutsideFunction: false,
// When enabled, import/export statements are not constrained to
// appearing at the top of the program.
allowImportExportEverywhere: false,
// When enabled, hashbang directive in the beginning of file
// is allowed and treated as a line comment.
allowHashBang: false,
// When `locations` is on, `loc` properties holding objects with
// `start` and `end` properties in `{line, column}` form (with
// line being 1-based and column 0-based) will be attached to the
// nodes.
locations: false,
// A function can be passed as `onToken` option, which will
// cause Acorn to call that function with object in the same
// format as tokens returned from `tokenizer().getToken()`. Note
// that you are not allowed to call the parser from the
// callback—that will corrupt its internal state.
onToken: null,
// A function can be passed as `onComment` option, which will
// cause Acorn to call that function with `(block, text, start,
// end)` parameters whenever a comment is skipped. `block` is a
// boolean indicating whether this is a block (`/* */`) comment,
// `text` is the content of the comment, and `start` and `end` are
// character offsets that denote the start and end of the comment.
// When the `locations` option is on, two more parameters are
// passed, the full `{line, column}` locations of the start and
// end of the comments. Note that you are not allowed to call the
// parser from the callback—that will corrupt its internal state.
onComment: null,
// Nodes have their start and end characters offsets recorded in
// `start` and `end` properties (directly on the node, rather than
// the `loc` object, which holds line/column data. To also add a
// [semi-standardized][range] `range` property holding a `[start,
// end]` array with the same numbers, set the `ranges` option to
// `true`.
//
// [range]: https://bugzilla.mozilla.org/show_bug.cgi?id=745678
ranges: false,
// It is possible to parse multiple files into a single AST by
// passing the tree produced by parsing the first file as
// `program` option in subsequent parses. This will add the
// toplevel forms of the parsed file to the `Program` (top) node
// of an existing parse tree.
program: null,
// When `locations` is on, you can pass this to record the source
// file in every node's `loc` object.
sourceFile: null,
// This value, if given, is stored in every node, whether
// `locations` is on or off.
directSourceFile: null,
// When enabled, parenthesized expressions are represented by
// (non-standard) ParenthesizedExpression nodes
preserveParens: false,
plugins: {}

};

exports.defaultOptions = defaultOptions; // Interpret and default an options object

function getOptions(opts) {

var options = {};
for (var opt in defaultOptions) {
  options[opt] = opts && _util.has(opts, opt) ? opts[opt] : defaultOptions[opt];
}if (options.allowReserved == null) options.allowReserved = options.ecmaVersion < 5;

if (_util.isArray(options.onToken)) {
  (function () {
    var tokens = options.onToken;
    options.onToken = function (token) {
      return tokens.push(token);
    };
  })();
}
if (_util.isArray(options.onComment)) options.onComment = pushComment(options, options.onComment);

return options;

}

function pushComment(options, array) {

return function (block, text, start, end, startLoc, endLoc) {
  var comment = {
    type: block ? 'Block' : 'Line',
    value: text,
    start: start,
    end: end
  };
  if (options.locations) comment.loc = new _locutil.SourceLocation(this, startLoc, endLoc);
  if (options.ranges) comment.range = [start, end];
  array.push(comment);
};

}

},{“./locutil”:5,“./util”:15}],9:[function(dereq,module,exports){ “use strict”;

exports.__esModule = true;

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(“Cannot call a class as a function”); } }

var _tokentype = dereq(“./tokentype”);

var _state = dereq(“./state”);

var _whitespace = dereq(“./whitespace”);

var pp = _state.Parser.prototype;

// ## Parser utilities

// Test whether a statement node is the string literal ‘“use strict”`.

pp.isUseStrict = function (stmt) {

return this.options.ecmaVersion >= 5 && stmt.type === "ExpressionStatement" && stmt.expression.type === "Literal" && stmt.expression.raw.slice(1, -1) === "use strict";

};

// Predicate that tests whether the next token is of the given // type, and if yes, consumes it as a side effect.

pp.eat = function (type) {

if (this.type === type) {
  this.next();
  return true;
} else {
  return false;
}

};

// Tests whether parsed token is a contextual keyword.

pp.isContextual = function (name) {

return this.type === _tokentype.types.name && this.value === name;

};

// Consumes contextual keyword if possible.

pp.eatContextual = function (name) {

return this.value === name && this.eat(_tokentype.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.type === _tokentype.types.eof || this.type === _tokentype.types.braceR || _whitespace.lineBreak.test(this.input.slice(this.lastTokEnd, this.start));

};

pp.insertSemicolon = function () {

if (this.canInsertSemicolon()) {
  if (this.options.onInsertedSemicolon) this.options.onInsertedSemicolon(this.lastTokEnd, this.lastTokEndLoc);
  return true;
}

};

// 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.eat(_tokentype.types.semi) && !this.insertSemicolon()) this.unexpected();

};

pp.afterTrailingComma = function (tokType) {

if (this.type == tokType) {
  if (this.options.onTrailingComma) this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc);
  this.next();
  return true;
}

};

// Expect a token of a given type. If found, consume it, otherwise, // raise an unexpected token error.

pp.expect = function (type) {

this.eat(type) || this.unexpected();

};

// Raise an unexpected token error.

pp.unexpected = function (pos) {

this.raise(pos != null ? pos : this.start, "Unexpected token");

};

var DestructuringErrors = function DestructuringErrors() {

_classCallCheck(this, DestructuringErrors);

this.shorthandAssign = 0;
this.trailingComma = 0;

};

exports.DestructuringErrors = DestructuringErrors;

pp.checkPatternErrors = function (refDestructuringErrors, andThrow) {

var trailing = refDestructuringErrors && refDestructuringErrors.trailingComma;
if (!andThrow) return !!trailing;
if (trailing) this.raise(trailing, "Comma is not permitted after the rest element");

};

pp.checkExpressionErrors = function (refDestructuringErrors, andThrow) {

var pos = refDestructuringErrors && refDestructuringErrors.shorthandAssign;
if (!andThrow) return !!pos;
if (pos) this.raise(pos, "Shorthand property assignments are valid only in destructuring patterns");

};

},{“./state”:10,“./tokentype”:14,“./whitespace”:16}],10:[function(dereq,module,exports){ “use strict”;

exports.__esModule = true;

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(“Cannot call a class as a function”); } }

var _identifier = dereq(“./identifier”);

var _tokentype = dereq(“./tokentype”);

var _whitespace = dereq(“./whitespace”);

var _options = dereq(“./options”);

// Registered plugins var plugins = {};

exports.plugins = plugins; function keywordRegexp(words) {

return new RegExp("^(" + words.replace(/ /g, "|") + ")$");

}

var Parser = (function () {

function Parser(options, input, startPos) {
  _classCallCheck(this, Parser);

  this.options = options = _options.getOptions(options);
  this.sourceFile = options.sourceFile;
  this.keywords = keywordRegexp(_identifier.keywords[options.ecmaVersion >= 6 ? 6 : 5]);
  var reserved = options.allowReserved ? "" : _identifier.reservedWords[options.ecmaVersion] + (options.sourceType == "module" ? " await" : "");
  this.reservedWords = keywordRegexp(reserved);
  var reservedStrict = (reserved ? reserved + " " : "") + _identifier.reservedWords.strict;
  this.reservedWordsStrict = keywordRegexp(reservedStrict);
  this.reservedWordsStrictBind = keywordRegexp(reservedStrict + " " + _identifier.reservedWords.strictBind);
  this.input = String(input);

  // Used to signal to callers of `readWord1` whether the word
  // contained any escape sequences. This is needed because words with
  // escape sequences must not be interpreted as keywords.
  this.containsEsc = false;

  // Load plugins
  this.loadPlugins(options.plugins);

  // Set up token state

  // The current position of the tokenizer in the input.
  if (startPos) {
    this.pos = startPos;
    this.lineStart = Math.max(0, this.input.lastIndexOf("\n", startPos));
    this.curLine = this.input.slice(0, this.lineStart).split(_whitespace.lineBreak).length;
  } else {
    this.pos = this.lineStart = 0;
    this.curLine = 1;
  }

  // Properties of the current token:
  // Its type
  this.type = _tokentype.types.eof;
  // For tokens that include more information than their type, the value
  this.value = null;
  // Its start and end offset
  this.start = this.end = this.pos;
  // And, if locations are used, the {line, column} object
  // corresponding to those offsets
  this.startLoc = this.endLoc = this.curPosition();

  // Position information for the previous token
  this.lastTokEndLoc = this.lastTokStartLoc = null;
  this.lastTokStart = this.lastTokEnd = this.pos;

  // The context stack is used to superficially track syntactic
  // context to predict whether a regular expression is allowed in a
  // given position.
  this.context = this.initialContext();
  this.exprAllowed = true;

  // Figure out if it's a module code.
  this.strict = this.inModule = options.sourceType === "module";

  // Used to signify the start of a potential arrow function
  this.potentialArrowAt = -1;

  // Flags to track whether we are in a function, a generator.
  this.inFunction = this.inGenerator = false;
  // Labels in scope.
  this.labels = [];

  // If enabled, skip leading hashbang line.
  if (this.pos === 0 && options.allowHashBang && this.input.slice(0, 2) === '#!') this.skipLineComment(2);
}

// DEPRECATED Kept for backwards compatibility until 3.0 in case a plugin uses them

Parser.prototype.isKeyword = function isKeyword(word) {
  return this.keywords.test(word);
};

Parser.prototype.isReservedWord = function isReservedWord(word) {
  return this.reservedWords.test(word);
};

Parser.prototype.extend = function extend(name, f) {
  this[name] = f(this[name]);
};

Parser.prototype.loadPlugins = function loadPlugins(pluginConfigs) {
  for (var _name in pluginConfigs) {
    var plugin = plugins[_name];
    if (!plugin) throw new Error("Plugin '" + _name + "' not found");
    plugin(this, pluginConfigs[_name]);
  }
};

Parser.prototype.parse = function parse() {
  var node = this.options.program || this.startNode();
  this.nextToken();
  return this.parseTopLevel(node);
};

return Parser;

})();

exports.Parser = Parser;

},{“./identifier”:2,“./options”:8,“./tokentype”:14,“./whitespace”:16}],11:[function(dereq,module,exports){ “use strict”;

var _tokentype = dereq(“./tokentype”);

var _state = dereq(“./state”);

var _whitespace = dereq(“./whitespace”);

var _identifier = dereq(“./identifier”);

var _parseutil = dereq(“./parseutil”);

var pp = _state.Parser.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.

pp.parseTopLevel = function (node) {

var first = true;
if (!node.body) node.body = [];
while (this.type !== _tokentype.types.eof) {
  var stmt = this.parseStatement(true, true);
  node.body.push(stmt);
  if (first) {
    if (this.isUseStrict(stmt)) this.setStrict(true);
    first = false;
  }
}
this.next();
if (this.options.ecmaVersion >= 6) {
  node.sourceType = this.options.sourceType;
}
return this.finishNode(node, "Program");

};

var loopLabel = { kind: “loop” },

switchLabel = { kind: "switch" };

pp.isLet = function () {

if (this.type !== _tokentype.types.name || this.options.ecmaVersion < 6 || this.value != "let") return false;
_whitespace.skipWhiteSpace.lastIndex = this.pos;
var skip = _whitespace.skipWhiteSpace.exec(this.input);
var next = this.pos + skip[0].length,
    nextCh = this.input.charCodeAt(next);
if (nextCh === 91 || nextCh == 123) return true; // '{' and '['
if (_identifier.isIdentifierStart(nextCh, true)) {
  for (var pos = next + 1; _identifier.isIdentifierChar(this.input.charCodeAt(pos, true)); ++pos) {}
  var ident = this.input.slice(next, pos);
  if (!this.isKeyword(ident)) return true;
}
return false;

};

// 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) {

var starttype = this.type,
    node = this.startNode(),
    kind = undefined;

if (this.isLet()) {
  starttype = _tokentype.types._var;
  kind = "let";
}

// 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 _tokentype.types._break:case _tokentype.types._continue:
    return this.parseBreakContinueStatement(node, starttype.keyword);
  case _tokentype.types._debugger:
    return this.parseDebuggerStatement(node);
  case _tokentype.types._do:
    return this.parseDoStatement(node);
  case _tokentype.types._for:
    return this.parseForStatement(node);
  case _tokentype.types._function:
    if (!declaration && this.options.ecmaVersion >= 6) this.unexpected();
    return this.parseFunctionStatement(node);
  case _tokentype.types._class:
    if (!declaration) this.unexpected();
    return this.parseClass(node, true);
  case _tokentype.types._if:
    return this.parseIfStatement(node);
  case _tokentype.types._return:
    return this.parseReturnStatement(node);
  case _tokentype.types._switch:
    return this.parseSwitchStatement(node);
  case _tokentype.types._throw:
    return this.parseThrowStatement(node);
  case _tokentype.types._try:
    return this.parseTryStatement(node);
  case _tokentype.types._const:case _tokentype.types._var:
    kind = kind || this.value;
    if (!declaration && kind != "var") this.unexpected();
    return this.parseVarStatement(node, kind);
  case _tokentype.types._while:
    return this.parseWhileStatement(node);
  case _tokentype.types._with:
    return this.parseWithStatement(node);
  case _tokentype.types.braceL:
    return this.parseBlock();
  case _tokentype.types.semi:
    return this.parseEmptyStatement(node);
  case _tokentype.types._export:
  case _tokentype.types._import:
    if (!this.options.allowImportExportEverywhere) {
      if (!topLevel) this.raise(this.start, "'import' and 'export' may only appear at the top level");
      if (!this.inModule) this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'");
    }
    return starttype === _tokentype.types._import ? this.parseImport(node) : this.parseExport(node);

  // 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.
  default:
    var maybeName = this.value,
        expr = this.parseExpression();
    if (starttype === _tokentype.types.name && expr.type === "Identifier" && this.eat(_tokentype.types.colon)) return this.parseLabeledStatement(node, maybeName, expr);else return this.parseExpressionStatement(node, expr);
}

};

pp.parseBreakContinueStatement = function (node, keyword) {

var isBreak = keyword == "break";
this.next();
if (this.eat(_tokentype.types.semi) || this.insertSemicolon()) node.label = null;else if (this.type !== _tokentype.types.name) this.unexpected();else {
  node.label = this.parseIdent();
  this.semicolon();
}

// Verify that there is an actual destination to break or
// continue to.
for (var i = 0; i < this.labels.length; ++i) {
  var lab = this.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.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.labels.push(loopLabel);
node.body = this.parseStatement(false);
this.labels.pop();
this.expect(_tokentype.types._while);
node.test = this.parseParenExpression();
if (this.options.ecmaVersion >= 6) this.eat(_tokentype.types.semi);else this.semicolon();
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.labels.push(loopLabel);
this.expect(_tokentype.types.parenL);
if (this.type === _tokentype.types.semi) return this.parseFor(node, null);
var isLet = this.isLet();
if (this.type === _tokentype.types._var || this.type === _tokentype.types._const || isLet) {
  var _init = this.startNode(),
      kind = isLet ? "let" : this.value;
  this.next();
  this.parseVar(_init, true, kind);
  this.finishNode(_init, "VariableDeclaration");
  if ((this.type === _tokentype.types._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) && _init.declarations.length === 1 && !(kind !== "var" && _init.declarations[0].init)) return this.parseForIn(node, _init);
  return this.parseFor(node, _init);
}
var refDestructuringErrors = new _parseutil.DestructuringErrors();
var init = this.parseExpression(true, refDestructuringErrors);
if (this.type === _tokentype.types._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) {
  this.checkPatternErrors(refDestructuringErrors, true);
  this.toAssignable(init);
  this.checkLVal(init);
  return this.parseForIn(node, init);
} else {
  this.checkExpressionErrors(refDestructuringErrors, true);
}
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(_tokentype.types._else) ? this.parseStatement(false) : null;
return this.finishNode(node, "IfStatement");

};

pp.parseReturnStatement = function (node) {

if (!this.inFunction && !this.options.allowReturnOutsideFunction) this.raise(this.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.eat(_tokentype.types.semi) || this.insertSemicolon()) 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(_tokentype.types.braceL);
this.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.

for (var cur, sawDefault = false; this.type != _tokentype.types.braceR;) {
  if (this.type === _tokentype.types._case || this.type === _tokentype.types._default) {
    var isCase = this.type === _tokentype.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.raiseRecoverable(this.lastTokStart, "Multiple default clauses");
      sawDefault = true;
      cur.test = null;
    }
    this.expect(_tokentype.types.colon);
  } else {
    if (!cur) this.unexpected();
    cur.consequent.push(this.parseStatement(true));
  }
}
if (cur) this.finishNode(cur, "SwitchCase");
this.next(); // Closing brace
this.labels.pop();
return this.finishNode(node, "SwitchStatement");

};

pp.parseThrowStatement = function (node) {

this.next();
if (_whitespace.lineBreak.test(this.input.slice(this.lastTokEnd, this.start))) this.raise(this.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.type === _tokentype.types._catch) {
  var clause = this.startNode();
  this.next();
  this.expect(_tokentype.types.parenL);
  clause.param = this.parseBindingAtom();
  this.checkLVal(clause.param, true);
  this.expect(_tokentype.types.parenR);
  clause.body = this.parseBlock();
  node.handler = this.finishNode(clause, "CatchClause");
}
node.finalizer = this.eat(_tokentype.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.labels.push(loopLabel);
node.body = this.parseStatement(false);
this.labels.pop();
return this.finishNode(node, "WhileStatement");

};

pp.parseWithStatement = function (node) {

if (this.strict) this.raise(this.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) {

for (var i = 0; i < this.labels.length; ++i) {
  if (this.labels[i].name === maybeName) this.raise(expr.start, "Label '" + maybeName + "' is already declared");
}var kind = this.type.isLoop ? "loop" : this.type === _tokentype.types._switch ? "switch" : null;
for (var i = this.labels.length - 1; i >= 0; i--) {
  var label = this.labels[i];
  if (label.statementStart == node.start) {
    label.statementStart = this.start;
    label.kind = kind;
  } else break;
}
this.labels.push({ name: maybeName, kind: kind, statementStart: this.start });
node.body = this.parseStatement(true);
this.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 (allowStrict) {

var node = this.startNode(),
    first = true,
    oldStrict = undefined;
node.body = [];
this.expect(_tokentype.types.braceL);
while (!this.eat(_tokentype.types.braceR)) {
  var stmt = this.parseStatement(true);
  node.body.push(stmt);
  if (first && allowStrict && this.isUseStrict(stmt)) {
    oldStrict = this.strict;
    this.setStrict(this.strict = true);
  }
  first = false;
}
if (oldStrict === false) this.setStrict(false);
return this.finishNode(node, "BlockStatement");

};

// 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(_tokentype.types.semi);
node.test = this.type === _tokentype.types.semi ? null : this.parseExpression();
this.expect(_tokentype.types.semi);
node.update = this.type === _tokentype.types.parenR ? null : this.parseExpression();
this.expect(_tokentype.types.parenR);
node.body = this.parseStatement(false);
this.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) {

var type = this.type === _tokentype.types._in ? "ForInStatement" : "ForOfStatement";
this.next();
node.left = init;
node.right = this.parseExpression();
this.expect(_tokentype.types.parenR);
node.body = this.parseStatement(false);
this.labels.pop();
return this.finishNode(node, type);

};

// Parse a list of variable declarations.

pp.parseVar = function (node, isFor, kind) {

node.declarations = [];
node.kind = kind;
for (;;) {
  var decl = this.startNode();
  this.parseVarId(decl);
  if (this.eat(_tokentype.types.eq)) {
    decl.init = this.parseMaybeAssign(isFor);
  } else if (kind === "const" && !(this.type === _tokentype.types._in || this.options.ecmaVersion >= 6 && this.isContextual("of"))) {
    this.unexpected();
  } else if (decl.id.type != "Identifier" && !(isFor && (this.type === _tokentype.types._in || this.isContextual("of")))) {
    this.raise(this.lastTokEnd, "Complex binding patterns require an initialization value");
  } else {
    decl.init = null;
  }
  node.declarations.push(this.finishNode(decl, "VariableDeclarator"));
  if (!this.eat(_tokentype.types.comma)) break;
}
return node;

};

pp.parseVarId = 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) {

this.initFunction(node);
if (this.options.ecmaVersion >= 6) node.generator = this.eat(_tokentype.types.star);
var oldInGen = this.inGenerator;
this.inGenerator = node.generator;
if (isStatement || this.type === _tokentype.types.name) node.id = this.parseIdent();
this.parseFunctionParams(node);
this.parseFunctionBody(node, allowExpressionBody);
this.inGenerator = oldInGen;
return this.finishNode(node, isStatement ? "FunctionDeclaration" : "FunctionExpression");

};

pp.parseFunctionParams = function (node) {

this.expect(_tokentype.types.parenL);
node.params = this.parseBindingList(_tokentype.types.parenR, false, false, true);

};

// Parse a class declaration or literal (depending on the // ‘isStatement` parameter).

pp.parseClass = function (node, isStatement) {

this.next();
this.parseClassId(node, isStatement);
this.parseClassSuper(node);
var classBody = this.startNode();
var hadConstructor = false;
classBody.body = [];
this.expect(_tokentype.types.braceL);
while (!this.eat(_tokentype.types.braceR)) {
  if (this.eat(_tokentype.types.semi)) continue;
  var method = this.startNode();
  var isGenerator = this.eat(_tokentype.types.star);
  var isMaybeStatic = this.type === _tokentype.types.name && this.value === "static";
  this.parsePropertyName(method);
  method["static"] = isMaybeStatic && this.type !== _tokentype.types.parenL;
  if (method["static"]) {
    if (isGenerator) this.unexpected();
    isGenerator = this.eat(_tokentype.types.star);
    this.parsePropertyName(method);
  }
  method.kind = "method";
  var isGetSet = false;
  if (!method.computed) {
    var key = method.key;

    if (!isGenerator && key.type === "Identifier" && this.type !== _tokentype.types.parenL && (key.name === "get" || key.name === "set")) {
      isGetSet = true;
      method.kind = key.name;
      key = this.parsePropertyName(method);
    }
    if (!method["static"] && (key.type === "Identifier" && key.name === "constructor" || key.type === "Literal" && key.value === "constructor")) {
      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");
      method.kind = "constructor";
      hadConstructor = true;
    }
  }
  this.parseClassMethod(classBody, method, isGenerator);
  if (isGetSet) {
    var paramCount = method.kind === "get" ? 0 : 1;
    if (method.value.params.length !== paramCount) {
      var start = method.value.start;
      if (method.kind === "get") this.raiseRecoverable(start, "getter should have no params");else this.raiseRecoverable(start, "setter should have exactly one param");
    }
    if (method.kind === "set" && method.value.params[0].type === "RestElement") this.raise(method.value.params[0].start, "Setter cannot use rest params");
  }
}
node.body = this.finishNode(classBody, "ClassBody");
return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression");

};

pp.parseClassMethod = function (classBody, method, isGenerator) {

method.value = this.parseMethod(isGenerator);
classBody.body.push(this.finishNode(method, "MethodDefinition"));

};

pp.parseClassId = function (node, isStatement) {

node.id = this.type === _tokentype.types.name ? this.parseIdent() : isStatement ? this.unexpected() : null;

};

pp.parseClassSuper = function (node) {

node.superClass = this.eat(_tokentype.types._extends) ? this.parseExprSubscripts() : null;

};

// Parses module export declaration.

pp.parseExport = function (node) {

this.next();
// export * from '...'
if (this.eat(_tokentype.types.star)) {
  this.expectContextual("from");
  node.source = this.type === _tokentype.types.string ? this.parseExprAtom() : this.unexpected();
  this.semicolon();
  return this.finishNode(node, "ExportAllDeclaration");
}
if (this.eat(_tokentype.types._default)) {
  // export default ...
  var parens = this.type == _tokentype.types.parenL;
  var expr = this.parseMaybeAssign();
  var needsSemi = true;
  if (!parens && (expr.type == "FunctionExpression" || expr.type == "ClassExpression")) {
    needsSemi = false;
    if (expr.id) {
      expr.type = expr.type == "FunctionExpression" ? "FunctionDeclaration" : "ClassDeclaration";
    }
  }
  node.declaration = expr;
  if (needsSemi) this.semicolon();
  return this.finishNode(node, "ExportDefaultDeclaration");
}
// export var|const|let|function|class ...
if (this.shouldParseExportStatement()) {
  node.declaration = this.parseStatement(true);
  node.specifiers = [];
  node.source = null;
} else {
  // export { x, y as z } [from '...']
  node.declaration = null;
  node.specifiers = this.parseExportSpecifiers();
  if (this.eatContextual("from")) {
    node.source = this.type === _tokentype.types.string ? this.parseExprAtom() : this.unexpected();
  } else {
    // check for keywords used as local names
    for (var i = 0; i < node.specifiers.length; i++) {
      if (this.keywords.test(node.specifiers[i].local.name) || this.reservedWords.test(node.specifiers[i].local.name)) {
        this.unexpected(node.specifiers[i].local.start);
      }
    }

    node.source = null;
  }
  this.semicolon();
}
return this.finishNode(node, "ExportNamedDeclaration");

};

pp.shouldParseExportStatement = function () {

return this.type.keyword || this.isLet();

};

// Parses a comma-separated list of module exports.

pp.parseExportSpecifiers = function () {

var nodes = [],
    first = true;
// export { x, y as z } [from '...']
this.expect(_tokentype.types.braceL);
while (!this.eat(_tokentype.types.braceR)) {
  if (!first) {
    this.expect(_tokentype.types.comma);
    if (this.afterTrailingComma(_tokentype.types.braceR)) break;
  } else first = false;

  var node = this.startNode();
  node.local = this.parseIdent(this.type === _tokentype.types._default);
  node.exported = this.eatContextual("as") ? this.parseIdent(true) : node.local;
  nodes.push(this.finishNode(node, "ExportSpecifier"));
}
return nodes;

};

// Parses import declaration.

pp.parseImport = function (node) {

this.next();
// import '...'
if (this.type === _tokentype.types.string) {
  node.specifiers = empty;
  node.source = this.parseExprAtom();
} else {
  node.specifiers = this.parseImportSpecifiers();
  this.expectContextual("from");
  node.source = this.type === _tokentype.types.string ? this.parseExprAtom() : this.unexpected();
}
this.semicolon();
return this.finishNode(node, "ImportDeclaration");

};

// Parses a comma-separated list of module imports.

pp.parseImportSpecifiers = function () {

var nodes = [],
    first = true;
if (this.type === _tokentype.types.name) {
  // import defaultObj, { x, y as z } from '...'
  var node = this.startNode();
  node.local = this.parseIdent();
  this.checkLVal(node.local, true);
  nodes.push(this.finishNode(node, "ImportDefaultSpecifier"));
  if (!this.eat(_tokentype.types.comma)) return nodes;
}
if (this.type === _tokentype.types.star) {
  var node = this.startNode();
  this.next();
  this.expectContextual("as");
  node.local = this.parseIdent();
  this.checkLVal(node.local, true);
  nodes.push(this.finishNode(node, "ImportNamespaceSpecifier"));
  return nodes;
}
this.expect(_tokentype.types.braceL);
while (!this.eat(_tokentype.types.braceR)) {
  if (!first) {
    this.expect(_tokentype.types.comma);
    if (this.afterTrailingComma(_tokentype.types.braceR)) break;
  } else first = false;

  var node = this.startNode();
  node.imported = this.parseIdent(true);
  if (this.eatContextual("as")) {
    node.local = this.parseIdent();
  } else {
    node.local = node.imported;
    if (this.isKeyword(node.local.name)) this.unexpected(node.local.start);
    if (this.reservedWordsStrict.test(node.local.name)) this.raise(node.local.start, "The keyword '" + node.local.name + "' is reserved");
  }
  this.checkLVal(node.local, true);
  nodes.push(this.finishNode(node, "ImportSpecifier"));
}
return nodes;

};

},{“./identifier”:2,“./parseutil”:9,“./state”:10,“./tokentype”:14,“./whitespace”:16}],12:[function(dereq,module,exports){ // 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 github.com/mozilla/sweet.js/wiki/design

“use strict”;

exports.__esModule = true;

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(“Cannot call a class as a function”); } }

var _state = dereq(“./state”);

var _tokentype = dereq(“./tokentype”);

var _whitespace = dereq(“./whitespace”);

var TokContext = function TokContext(token, isExpr, preserveSpace, override) {

_classCallCheck(this, TokContext);

this.token = token;
this.isExpr = !!isExpr;
this.preserveSpace = !!preserveSpace;
this.override = override;

};

exports.TokContext = TokContext; var 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)

};

exports.types = types; var pp = _state.Parser.prototype;

pp.initialContext = function () {

return [types.b_stat];

};

pp.braceIsBlock = function (prevType) {

if (prevType === _tokentype.types.colon) {
  var _parent = this.curContext();
  if (_parent === types.b_stat || _parent === types.b_expr) return !_parent.isExpr;
}
if (prevType === _tokentype.types._return) return _whitespace.lineBreak.test(this.input.slice(this.lastTokEnd, this.start));
if (prevType === _tokentype.types._else || prevType === _tokentype.types.semi || prevType === _tokentype.types.eof || prevType === _tokentype.types.parenR) return true;
if (prevType == _tokentype.types.braceL) return this.curContext() === types.b_stat;
return !this.exprAllowed;

};

pp.updateContext = function (prevType) {

var update = undefined,
    type = this.type;
if (type.keyword && prevType == _tokentype.types.dot) this.exprAllowed = false;else if (update = type.updateContext) update.call(this, prevType);else this.exprAllowed = type.beforeExpr;

};

// Token-specific context update code

_tokentype.types.parenR.updateContext = _tokentype.types.braceR.updateContext = function () {

if (this.context.length == 1) {
  this.exprAllowed = true;
  return;
}
var out = this.context.pop();
if (out === types.b_stat && this.curContext() === types.f_expr) {
  this.context.pop();
  this.exprAllowed = false;
} else if (out === types.b_tmpl) {
  this.exprAllowed = true;
} else {
  this.exprAllowed = !out.isExpr;
}

};

_tokentype.types.braceL.updateContext = function (prevType) {

this.context.push(this.braceIsBlock(prevType) ? types.b_stat : types.b_expr);
this.exprAllowed = true;

};

_tokentype.types.dollarBraceL.updateContext = function () {

this.context.push(types.b_tmpl);
this.exprAllowed = true;

};

_tokentype.types.parenL.updateContext = function (prevType) {

var statementParens = prevType === _tokentype.types._if || prevType === _tokentype.types._for || prevType === _tokentype.types._with || prevType === _tokentype.types._while;
this.context.push(statementParens ? types.p_stat : types.p_expr);
this.exprAllowed = true;

};

_tokentype.types.incDec.updateContext = function () {

// tokExprAllowed stays unchanged

};

_tokentype.types._function.updateContext = function (prevType) {

if (prevType.beforeExpr && prevType !== _tokentype.types.semi && prevType !== _tokentype.types._else && (prevType !== _tokentype.types.colon || this.curContext() !== types.b_stat)) this.context.push(types.f_expr);
this.exprAllowed = false;

};

_tokentype.types.backQuote.updateContext = function () {

if (this.curContext() === types.q_tmpl) this.context.pop();else this.context.push(types.q_tmpl);
this.exprAllowed = false;

};

},{“./state”:10,“./tokentype”:14,“./whitespace”:16}],13:[function(dereq,module,exports){ “use strict”;

exports.__esModule = true;

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(“Cannot call a class as a function”); } }

var _identifier = dereq(“./identifier”);

var _tokentype = dereq(“./tokentype”);

var _state = dereq(“./state”);

var _locutil = dereq(“./locutil”);

var _whitespace = dereq(“./whitespace”);

// Object type used to represent tokens. Note that normally, tokens // simply exist as properties on the parser object. This is only // used for the onToken callback and the external tokenizer.

var Token = function Token(p) {

_classCallCheck(this, Token);

this.type = p.type;
this.value = p.value;
this.start = p.start;
this.end = p.end;
if (p.options.locations) this.loc = new _locutil.SourceLocation(p, p.startLoc, p.endLoc);
if (p.options.ranges) this.range = [p.start, p.end];

}

// ## Tokenizer

;

exports.Token = Token; var pp = _state.Parser.prototype;

// Are we running under Rhino? var isRhino = typeof Packages == “object” && Object.prototype.toString.call(Packages) == “[object JavaPackage]”;

// Move to the next token

pp.next = function () {

if (this.options.onToken) this.options.onToken(new Token(this));

this.lastTokEnd = this.end;
this.lastTokStart = this.start;
this.lastTokEndLoc = this.endLoc;
this.lastTokStartLoc = this.startLoc;
this.nextToken();

};

pp.getToken = function () {

this.next();
return new Token(this);

};

// If we’re in an ES6 environment, make parsers iterable if (typeof Symbol !== “undefined”) pp = function () {

var self = this;
return { next: function next() {
    var token = self.getToken();
    return {
      done: token.type === _tokentype.types.eof,
      value: token
    };
  } };

};

// Toggle strict mode. Re-reads the next number or string to please // pedantic tests (‘“use strict”; 010;` should fail).

pp.setStrict = function (strict) {

this.strict = strict;
if (this.type !== _tokentype.types.num && this.type !== _tokentype.types.string) return;
this.pos = this.start;
if (this.options.locations) {
  while (this.pos < this.lineStart) {
    this.lineStart = this.input.lastIndexOf("\n", this.lineStart - 2) + 1;
    --this.curLine;
  }
}
this.nextToken();

};

pp.curContext = function () {

return this.context[this.context.length - 1];

};

// Read a single token, updating the parser object’s token-related // properties.

pp.nextToken = function () {

var curContext = this.curContext();
if (!curContext || !curContext.preserveSpace) this.skipSpace();

this.start = this.pos;
if (this.options.locations) this.startLoc = this.curPosition();
if (this.pos >= this.input.length) return this.finishToken(_tokentype.types.eof);

if (curContext.override) return curContext.override(this);else this.readToken(this.fullCharCodeAtPos());

};

pp.readToken = function (code) {

// Identifier or keyword. '\uXXXX' sequences are allowed in
// identifiers, so '\' also dispatches to that.
if (_identifier.isIdentifierStart(code, this.options.ecmaVersion >= 6) || code === 92 /* '\' */) return this.readWord();

return this.getTokenFromCode(code);

};

pp.fullCharCodeAtPos = function () {

var code = this.input.charCodeAt(this.pos);
if (code <= 0xd7ff || code >= 0xe000) return code;
var next = this.input.charCodeAt(this.pos + 1);
return (code << 10) + next - 0x35fdc00;

};

pp.skipBlockComment = function () {

var startLoc = this.options.onComment && this.curPosition();
var start = this.pos,
    end = this.input.indexOf("*/", this.pos += 2);
if (end === -1) this.raise(this.pos - 2, "Unterminated comment");
this.pos = end + 2;
if (this.options.locations) {
  _whitespace.lineBreakG.lastIndex = start;
  var match = undefined;
  while ((match = _whitespace.lineBreakG.exec(this.input)) && match.index < this.pos) {
    ++this.curLine;
    this.lineStart = match.index + match[0].length;
  }
}
if (this.options.onComment) this.options.onComment(true, this.input.slice(start + 2, end), start, this.pos, startLoc, this.curPosition());

};

pp.skipLineComment = function (startSkip) {

var start = this.pos;
var startLoc = this.options.onComment && this.curPosition();
var ch = this.input.charCodeAt(this.pos += startSkip);
while (this.pos < this.input.length && ch !== 10 && ch !== 13 && ch !== 8232 && ch !== 8233) {
  ++this.pos;
  ch = this.input.charCodeAt(this.pos);
}
if (this.options.onComment) this.options.onComment(false, this.input.slice(start + startSkip, this.pos), start, this.pos, startLoc, this.curPosition());

};

// Called at the start of the parse and after every token. Skips // whitespace and comments, and.

pp.skipSpace = function () {

loop: while (this.pos < this.input.length) {
  var ch = this.input.charCodeAt(this.pos);
  switch (ch) {
    case 32:case 160:
      // ' '
      ++this.pos;
      break;
    case 13:
      if (this.input.charCodeAt(this.pos + 1) === 10) {
        ++this.pos;
      }
    case 10:case 8232:case 8233:
      ++this.pos;
      if (this.options.locations) {
        ++this.curLine;
        this.lineStart = this.pos;
      }
      break;
    case 47:
      // '/'
      switch (this.input.charCodeAt(this.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.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.

pp.finishToken = function (type, val) {

this.end = this.pos;
if (this.options.locations) this.endLoc = this.curPosition();
var prevType = this.type;
this.type = type;
this.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. // pp.readToken_dot = function () {

var next = this.input.charCodeAt(this.pos + 1);
if (next >= 48 && next <= 57) return this.readNumber(true);
var next2 = this.input.charCodeAt(this.pos + 2);
if (this.options.ecmaVersion >= 6 && next === 46 && next2 === 46) {
  // 46 = dot '.'
  this.pos += 3;
  return this.finishToken(_tokentype.types.ellipsis);
} else {
  ++this.pos;
  return this.finishToken(_tokentype.types.dot);
}

};

pp.readToken_slash = function () {

// '/'
var next = this.input.charCodeAt(this.pos + 1);
if (this.exprAllowed) {
  ++this.pos;return this.readRegexp();
}
if (next === 61) return this.finishOp(_tokentype.types.assign, 2);
return this.finishOp(_tokentype.types.slash, 1);

};

pp.readToken_mult_modulo_exp = function (code) {

// '%*'
var next = this.input.charCodeAt(this.pos + 1);
var size = 1;
var tokentype = code === 42 ? _tokentype.types.star : _tokentype.types.modulo;

// exponentiation operator ** and **=
if (this.options.ecmaVersion >= 7 && next === 42) {
  ++size;
  tokentype = _tokentype.types.starstar;
  next = this.input.charCodeAt(this.pos + 2);
}

if (next === 61) return this.finishOp(_tokentype.types.assign, size + 1);
return this.finishOp(tokentype, size);

};

pp.readToken_pipe_amp = function (code) {

// '|&'
var next = this.input.charCodeAt(this.pos + 1);
if (next === code) return this.finishOp(code === 124 ? _tokentype.types.logicalOR : _tokentype.types.logicalAND, 2);
if (next === 61) return this.finishOp(_tokentype.types.assign, 2);
return this.finishOp(code === 124 ? _tokentype.types.bitwiseOR : _tokentype.types.bitwiseAND, 1);

};

pp.readToken_caret = function () {

// '^'
var next = this.input.charCodeAt(this.pos + 1);
if (next === 61) return this.finishOp(_tokentype.types.assign, 2);
return this.finishOp(_tokentype.types.bitwiseXOR, 1);

};

pp.readToken_plus_min = function (code) {

// '+-'
var next = this.input.charCodeAt(this.pos + 1);
if (next === code) {
  if (next == 45 && this.input.charCodeAt(this.pos + 2) == 62 && _whitespace.lineBreak.test(this.input.slice(this.lastTokEnd, this.pos))) {
    // A `-->` line comment
    this.skipLineComment(3);
    this.skipSpace();
    return this.nextToken();
  }
  return this.finishOp(_tokentype.types.incDec, 2);
}
if (next === 61) return this.finishOp(_tokentype.types.assign, 2);
return this.finishOp(_tokentype.types.plusMin, 1);

};

pp.readToken_lt_gt = function (code) {

// '<>'
var next = this.input.charCodeAt(this.pos + 1);
var size = 1;
if (next === code) {
  size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2;
  if (this.input.charCodeAt(this.pos + size) === 61) return this.finishOp(_tokentype.types.assign, size + 1);
  return this.finishOp(_tokentype.types.bitShift, size);
}
if (next == 33 && code == 60 && this.input.charCodeAt(this.pos + 2) == 45 && this.input.charCodeAt(this.pos + 3) == 45) {
  if (this.inModule) this.unexpected();
  // `<!--`, an XML-style comment that should be interpreted as a line comment
  this.skipLineComment(4);
  this.skipSpace();
  return this.nextToken();
}
if (next === 61) size = 2;
return this.finishOp(_tokentype.types.relational, size);

};

pp.readToken_eq_excl = function (code) {

// '=!'
var next = this.input.charCodeAt(this.pos + 1);
if (next === 61) return this.finishOp(_tokentype.types.equality, this.input.charCodeAt(this.pos + 2) === 61 ? 3 : 2);
if (code === 61 && next === 62 && this.options.ecmaVersion >= 6) {
  // '=>'
  this.pos += 2;
  return this.finishToken(_tokentype.types.arrow);
}
return this.finishOp(code === 61 ? _tokentype.types.eq : _tokentype.types.prefix, 1);

};

pp.getTokenFromCode = function (code) {

switch (code) {
  // The interpretation of a dot depends on whether it is followed
  // by a digit or another two dots.
  case 46:
    // '.'
    return this.readToken_dot();

  // Punctuation tokens.
  case 40:
    ++this.pos;return this.finishToken(_tokentype.types.parenL);
  case 41:
    ++this.pos;return this.finishToken(_tokentype.types.parenR);
  case 59:
    ++this.pos;return this.finishToken(_tokentype.types.semi);
  case 44:
    ++this.pos;return this.finishToken(_tokentype.types.comma);
  case 91:
    ++this.pos;return this.finishToken(_tokentype.types.bracketL);
  case 93:
    ++this.pos;return this.finishToken(_tokentype.types.bracketR);
  case 123:
    ++this.pos;return this.finishToken(_tokentype.types.braceL);
  case 125:
    ++this.pos;return this.finishToken(_tokentype.types.braceR);
  case 58:
    ++this.pos;return this.finishToken(_tokentype.types.colon);
  case 63:
    ++this.pos;return this.finishToken(_tokentype.types.question);

  case 96:
    // '`'
    if (this.options.ecmaVersion < 6) break;
    ++this.pos;
    return this.finishToken(_tokentype.types.backQuote);

  case 48:
    // '0'
    var next = this.input.charCodeAt(this.pos + 1);
    if (next === 120 || next === 88) return this.readRadixNumber(16); // '0x', '0X' - hex number
    if (this.options.ecmaVersion >= 6) {
      if (next === 111 || next === 79) return this.readRadixNumber(8); // '0o', '0O' - octal number
      if (next === 98 || next === 66) return this.readRadixNumber(2); // '0b', '0B' - binary number
    }
  // Anything else beginning with a digit is an integer, octal
  // number, or float.
  case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:
    // 1-9
    return this.readNumber(false);

  // Quotes produce strings.
  case 34:case 39:
    // '"', "'"
    return this.readString(code);

  // Operators are parsed inline in tiny state machines. '=' (61) is
  // often referred to. `finishOp` simply skips the amount of
  // characters it is given as second argument, and returns a token
  // of the type given by its first argument.

  case 47:
    // '/'
    return this.readToken_slash();

  case 37:case 42:
    // '%*'
    return this.readToken_mult_modulo_exp(code);

  case 124:case 38:
    // '|&'
    return this.readToken_pipe_amp(code);

  case 94:
    // '^'
    return this.readToken_caret();

  case 43:case 45:
    // '+-'
    return this.readToken_plus_min(code);

  case 60:case 62:
    // '<>'
    return this.readToken_lt_gt(code);

  case 61:case 33:
    // '=!'
    return this.readToken_eq_excl(code);

  case 126:
    // '~'
    return this.finishOp(_tokentype.types.prefix, 1);
}

this.raise(this.pos, "Unexpected character '" + codePointToString(code) + "'");

};

pp.finishOp = function (type, size) {

var str = this.input.slice(this.pos, this.pos + size);
this.pos += size;
return this.finishToken(type, str);

};

// Parse a regular expression. Some context-awareness is necessary, // since a ‘/’ inside a ‘[]’ set does not end the expression.

function tryCreateRegexp(src, flags, throwErrorAt, parser) {

try {
  return new RegExp(src, flags);
} catch (e) {
  if (throwErrorAt !== undefined) {
    if (e instanceof SyntaxError) parser.raise(throwErrorAt, "Error parsing regular expression: " + e.message);
    throw e;
  }
}

}

var regexpUnicodeSupport = !!tryCreateRegexp(“￿”, “u”);

pp.readRegexp = function () {

var _this = this;

var escaped = undefined,
    inClass = undefined,
    start = this.pos;
for (;;) {
  if (this.pos >= this.input.length) this.raise(start, "Unterminated regular expression");
  var ch = this.input.charAt(this.pos);
  if (_whitespace.lineBreak.test(ch)) this.raise(start, "Unterminated regular expression");
  if (!escaped) {
    if (ch === "[") inClass = true;else if (ch === "]" && inClass) inClass = false;else if (ch === "/" && !inClass) break;
    escaped = ch === "\\";
  } else escaped = false;
  ++this.pos;
}
var content = this.input.slice(start, this.pos);
++this.pos;
// Need to use `readWord1` because '\uXXXX' sequences are allowed
// here (don't ask).
var mods = this.readWord1();
var tmp = content,
    tmpFlags = "";
if (mods) {
  var validFlags = /^[gim]*$/;
  if (this.options.ecmaVersion >= 6) validFlags = /^[gimuy]*$/;
  if (!validFlags.test(mods)) this.raise(start, "Invalid regular expression flag");
  if (mods.indexOf("u") >= 0) {
    if (regexpUnicodeSupport) {
      tmpFlags = "u";
    } else {
      // Replace each astral symbol and every Unicode escape sequence that
      // possibly represents an astral symbol or a paired surrogate with a
      // single ASCII symbol to avoid throwing on regular expressions that
      // are only valid in combination with the `/u` flag.
      // Note: replacing with the ASCII symbol `x` might cause false
      // negatives in unlikely scenarios. For example, `[\u{61}-b]` is a
      // perfectly valid pattern that is equivalent to `[a-b]`, but it would
      // be replaced by `[x-b]` which throws an error.
      tmp = tmp.replace(/\\u\{([0-9a-fA-F]+)\}/g, function (_match, code, offset) {
        code = Number("0x" + code);
        if (code > 0x10FFFF) _this.raise(start + offset + 3, "Code point out of bounds");
        return "x";
      });
      tmp = tmp.replace(/\\u([a-fA-F0-9]{4})|[\uD800-\uDBFF][\uDC00-\uDFFF]/g, "x");
      tmpFlags = tmpFlags.replace("u", "");
    }
  }
}
// Detect invalid regular expressions.
var value = null;
// Rhino's regular expression parser is flaky and throws uncatchable exceptions,
// so don't do detection if we are running under Rhino
if (!isRhino) {
  tryCreateRegexp(tmp, tmpFlags, start, this);
  // Get a regular expression object for this pattern-flag pair, or `null` in
  // case the current environment doesn't support the flags it uses.
  value = tryCreateRegexp(content, mods);
}
return this.finishToken(_tokentype.types.regexp, { pattern: content, flags: mods, value: value });

};

// Read an integer in the given radix. Return null if zero digits // were read, the integer value otherwise. When ‘len` is given, this // will return `null` unless the integer has exactly `len` digits.

pp.readInt = function (radix, len) {

var start = this.pos,
    total = 0;
for (var i = 0, e = len == null ? Infinity : len; i < e; ++i) {
  var code = this.input.charCodeAt(this.pos),
      val = undefined;
  if (code >= 97) val = code - 97 + 10; // a
  else if (code >= 65) val = code - 65 + 10; // A
    else if (code >= 48 && code <= 57) val = code - 48; // 0-9
      else val = Infinity;
  if (val >= radix) break;
  ++this.pos;
  total = total * radix + val;
}
if (this.pos === start || len != null && this.pos - start !== len) return null;

return total;

};

pp.readRadixNumber = function (radix) {

this.pos += 2; // 0x
var val = this.readInt(radix);
if (val == null) this.raise(this.start + 2, "Expected number in radix " + radix);
if (_identifier.isIdentifierStart(this.fullCharCodeAtPos())) this.raise(this.pos, "Identifier directly after number");
return this.finishToken(_tokentype.types.num, val);

};

// Read an integer, octal integer, or floating-point number.

pp.readNumber = function (startsWithDot) {

var start = this.pos,
    isFloat = false,
    octal = this.input.charCodeAt(this.pos) === 48;
if (!startsWithDot && this.readInt(10) === null) this.raise(start, "Invalid number");
var next = this.input.charCodeAt(this.pos);
if (next === 46) {
  // '.'
  ++this.pos;
  this.readInt(10);
  isFloat = true;
  next = this.input.charCodeAt(this.pos);
}
if (next === 69 || next === 101) {
  // 'eE'
  next = this.input.charCodeAt(++this.pos);
  if (next === 43 || next === 45) ++this.pos; // '+-'
  if (this.readInt(10) === null) this.raise(start, "Invalid number");
  isFloat = true;
}
if (_identifier.isIdentifierStart(this.fullCharCodeAtPos())) this.raise(this.pos, "Identifier directly after number");

var str = this.input.slice(start, this.pos),
    val = undefined;
if (isFloat) val = parseFloat(str);else if (!octal || str.length === 1) val = parseInt(str, 10);else if (/[89]/.test(str) || this.strict) this.raise(start, "Invalid number");else val = parseInt(str, 8);
return this.finishToken(_tokentype.types.num, val);

};

// Read a string value, interpreting backslash-escapes.

pp.readCodePoint = function () {

var ch = this.input.charCodeAt(this.pos),
    code = undefined;

if (ch === 123) {
  if (this.options.ecmaVersion < 6) this.unexpected();
  var codePos = ++this.pos;
  code = this.readHexChar(this.input.indexOf('}', this.pos) - this.pos);
  ++this.pos;
  if (code > 0x10FFFF) this.raise(codePos, "Code point out of bounds");
} else {
  code = this.readHexChar(4);
}
return code;

};

function codePointToString(code) {

// UTF-16 Decoding
if (code <= 0xFFFF) return String.fromCharCode(code);
code -= 0x10000;
return String.fromCharCode((code >> 10) + 0xD800, (code & 1023) + 0xDC00);

}

pp.readString = function (quote) {

var out = "",
    chunkStart = ++this.pos;
for (;;) {
  if (this.pos >= this.input.length) this.raise(this.start, "Unterminated string constant");
  var ch = this.input.charCodeAt(this.pos);
  if (ch === quote) break;
  if (ch === 92) {
    // '\'
    out += this.input.slice(chunkStart, this.pos);
    out += this.readEscapedChar(false);
    chunkStart = this.pos;
  } else {
    if (_whitespace.isNewLine(ch)) this.raise(this.start, "Unterminated string constant");
    ++this.pos;
  }
}
out += this.input.slice(chunkStart, this.pos++);
return this.finishToken(_tokentype.types.string, out);

};

// Reads template string tokens.

pp.readTmplToken = function () {

var out = "",
    chunkStart = this.pos;
for (;;) {
  if (this.pos >= this.input.length) this.raise(this.start, "Unterminated template");
  var ch = this.input.charCodeAt(this.pos);
  if (ch === 96 || ch === 36 && this.input.charCodeAt(this.pos + 1) === 123) {
    // '`', '${'
    if (this.pos === this.start && this.type === _tokentype.types.template) {
      if (ch === 36) {
        this.pos += 2;
        return this.finishToken(_tokentype.types.dollarBraceL);
      } else {
        ++this.pos;
        return this.finishToken(_tokentype.types.backQuote);
      }
    }
    out += this.input.slice(chunkStart, this.pos);
    return this.finishToken(_tokentype.types.template, out);
  }
  if (ch === 92) {
    // '\'
    out += this.input.slice(chunkStart, this.pos);
    out += this.readEscapedChar(true);
    chunkStart = this.pos;
  } else if (_whitespace.isNewLine(ch)) {
    out += this.input.slice(chunkStart, this.pos);
    ++this.pos;
    switch (ch) {
      case 13:
        if (this.input.charCodeAt(this.pos) === 10) ++this.pos;
      case 10:
        out += "\n";
        break;
      default:
        out += String.fromCharCode(ch);
        break;
    }
    if (this.options.locations) {
      ++this.curLine;
      this.lineStart = this.pos;
    }
    chunkStart = this.pos;
  } else {
    ++this.pos;
  }
}

};

// Used to read escaped characters

pp.readEscapedChar = function (inTemplate) {

var ch = this.input.charCodeAt(++this.pos);
++this.pos;
switch (ch) {
  case 110:
    return "\n"; // 'n' -> '\n'
  case 114:
    return "\r"; // 'r' -> '\r'
  case 120:
    return String.fromCharCode(this.readHexChar(2)); // 'x'
  case 117:
    return codePointToString(this.readCodePoint()); // 'u'
  case 116:
    return "\t"; // 't' -> '\t'
  case 98:
    return "\b"; // 'b' -> '\b'
  case 118:
    return "\u000b"; // 'v' -> '\u000b'
  case 102:
    return "\f"; // 'f' -> '\f'
  case 13:
    if (this.input.charCodeAt(this.pos) === 10) ++this.pos; // '\r\n'
  case 10:
    // ' \n'
    if (this.options.locations) {
      this.lineStart = this.pos;++this.curLine;
    }
    return "";
  default:
    if (ch >= 48 && ch <= 55) {
      var octalStr = this.input.substr(this.pos - 1, 3).match(/^[0-7]+/)[0];
      var octal = parseInt(octalStr, 8);
      if (octal > 255) {
        octalStr = octalStr.slice(0, -1);
        octal = parseInt(octalStr, 8);
      }
      if (octalStr !== "0" && (this.strict || inTemplate)) {
        this.raise(this.pos - 2, "Octal literal in strict mode");
      }
      this.pos += octalStr.length - 1;
      return String.fromCharCode(octal);
    }
    return String.fromCharCode(ch);
}

};

// Used to read character escape sequences (‘x’, ‘u’, ‘U’).

pp.readHexChar = function (len) {

var codePos = this.pos;
var n = this.readInt(16, len);
if (n === null) this.raise(codePos, "Bad character escape sequence");
return n;

};

// Read an identifier, and return it as a string. Sets ‘this.containsEsc` // to whether the word contained a ’u‘ escape. // // Incrementally adds only escaped chars, adding other chunks as-is // as a micro-optimization.

pp.readWord1 = function () {

this.containsEsc = false;
var word = "",
    first = true,
    chunkStart = this.pos;
var astral = this.options.ecmaVersion >= 6;
while (this.pos < this.input.length) {
  var ch = this.fullCharCodeAtPos();
  if (_identifier.isIdentifierChar(ch, astral)) {
    this.pos += ch <= 0xffff ? 1 : 2;
  } else if (ch === 92) {
    // "\"
    this.containsEsc = true;
    word += this.input.slice(chunkStart, this.pos);
    var escStart = this.pos;
    if (this.input.charCodeAt(++this.pos) != 117) // "u"
      this.raise(this.pos, "Expecting Unicode escape sequence \\uXXXX");
    ++this.pos;
    var esc = this.readCodePoint();
    if (!(first ? _identifier.isIdentifierStart : _identifier.isIdentifierChar)(esc, astral)) this.raise(escStart, "Invalid Unicode escape");
    word += codePointToString(esc);
    chunkStart = this.pos;
  } else {
    break;
  }
  first = false;
}
return word + this.input.slice(chunkStart, this.pos);

};

// Read an identifier or keyword token. Will check for reserved // words when necessary.

pp.readWord = function () {

var word = this.readWord1();
var type = _tokentype.types.name;
if ((this.options.ecmaVersion >= 6 || !this.containsEsc) && this.keywords.test(word)) type = _tokentype.keywords[word];
return this.finishToken(type, word);

};

},{“./identifier”:2,“./locutil”:5,“./state”:10,“./tokentype”:14,“./whitespace”:16}],14:[function(dereq,module,exports){ // ## Token types

// The assignment of fine-grained, information-carrying type objects // allows the tokenizer to store the information it has about a // token in a way that is very cheap for the parser to look up.

// All token type variables start with an underscore, to make them // easy to recognize.

// The ‘beforeExpr` property is used to disambiguate between regular // expressions and divisions. It is set on all token types that can // be followed by an expression (thus, a slash after them would be a // regular expression). // // The `startsExpr` property is used to check if the token ends a // `yield` expression. It is set on all token types that either can // directly start an expression (like a quotation mark) or can // continue an expression (like the body of a string). // // `isLoop` marks a keyword as starting a loop, which is important // to know when parsing a label, in order to allow or disallow // continue jumps to that label.

“use strict”;

exports.__esModule = true;

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(“Cannot call a class as a function”); } }

var TokenType = function TokenType(label) {

var conf = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];

_classCallCheck(this, TokenType);

this.label = label;
this.keyword = conf.keyword;
this.beforeExpr = !!conf.beforeExpr;
this.startsExpr = !!conf.startsExpr;
this.isLoop = !!conf.isLoop;
this.isAssign = !!conf.isAssign;
this.prefix = !!conf.prefix;
this.postfix = !!conf.postfix;
this.binop = conf.binop || null;
this.updateContext = null;

};

exports.TokenType = TokenType;

function binop(name, prec) {

return new TokenType(name, { beforeExpr: true, binop: prec });

} var beforeExpr = { beforeExpr: true },

startsExpr = { startsExpr: true };

var types = {

num: new TokenType("num", startsExpr),
regexp: new TokenType("regexp", startsExpr),
string: new TokenType("string", startsExpr),
name: new TokenType("name", startsExpr),
eof: new TokenType("eof"),

// Punctuation token types.
bracketL: new TokenType("[", { beforeExpr: true, startsExpr: true }),
bracketR: new TokenType("]"),
braceL: new TokenType("{", { beforeExpr: true, startsExpr: true }),
braceR: new TokenType("}"),
parenL: new TokenType("(", { beforeExpr: true, startsExpr: true }),
parenR: new TokenType(")"),
comma: new TokenType(",", beforeExpr),
semi: new TokenType(";", beforeExpr),
colon: new TokenType(":", beforeExpr),
dot: new TokenType("."),
question: new TokenType("?", beforeExpr),
arrow: new TokenType("=>", beforeExpr),
template: new TokenType("template"),
ellipsis: new TokenType("...", beforeExpr),
backQuote: new TokenType("`", startsExpr),
dollarBraceL: new TokenType("${", { beforeExpr: true, startsExpr: true }),

// Operators. These carry several kinds of properties to help the
// parser use them properly (the presence of these properties is
// what categorizes them as operators).
//
// `binop`, when present, specifies that this operator is a binary
// operator, and will refer to its precedence.
//
// `prefix` and `postfix` mark the operator as a prefix or postfix
// unary operator.
//
// `isAssign` marks all of `=`, `+=`, `-=` etcetera, which act as
// binary operators with a very low precedence, that should result
// in AssignmentExpression nodes.

eq: new TokenType("=", { beforeExpr: true, isAssign: true }),
assign: new TokenType("_=", { beforeExpr: true, isAssign: true }),
incDec: new TokenType("++/--", { prefix: true, postfix: true, startsExpr: true }),
prefix: new TokenType("prefix", { beforeExpr: true, prefix: true, startsExpr: true }),
logicalOR: binop("||", 1),
logicalAND: binop("&&", 2),
bitwiseOR: binop("|", 3),
bitwiseXOR: binop("^", 4),
bitwiseAND: binop("&", 5),
equality: binop("==/!=", 6),
relational: binop("</>", 7),
bitShift: binop("<</>>", 8),
plusMin: new TokenType("+/-", { beforeExpr: true, binop: 9, prefix: true, startsExpr: true }),
modulo: binop("%", 10),
star: binop("*", 10),
slash: binop("/", 10),
starstar: new TokenType("**", { beforeExpr: true })

};

exports.types = types; // Map keyword names to token types.

var keywords = {};

exports.keywords = keywords; // Succinct definitions of keyword token types function kw(name) {

var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];

options.keyword = name;
keywords[name] = types["_" + name] = new TokenType(name, options);

}

kw(“break”); kw(“case”, beforeExpr); kw(“catch”); kw(“continue”); kw(“debugger”); kw(“default”, beforeExpr); kw(“do”, { isLoop: true, beforeExpr: true }); kw(“else”, beforeExpr); kw(“finally”); kw(“for”, { isLoop: true }); kw(“function”, startsExpr); kw(“if”); kw(“return”, beforeExpr); kw(“switch”); kw(“throw”, beforeExpr); kw(“try”); kw(“var”); kw(“const”); kw(“while”, { isLoop: true }); kw(“with”); kw(“new”, { beforeExpr: true, startsExpr: true }); kw(“this”, startsExpr); kw(“super”, startsExpr); kw(“class”); kw(“extends”, beforeExpr); kw(“export”); kw(“import”); kw(“null”, startsExpr); kw(“true”, startsExpr); kw(“false”, startsExpr); kw(“in”, { beforeExpr: true, binop: 7 }); kw(“instanceof”, { beforeExpr: true, binop: 7 }); kw(“typeof”, { beforeExpr: true, prefix: true, startsExpr: true }); kw(“void”, { beforeExpr: true, prefix: true, startsExpr: true }); kw(“delete”, { beforeExpr: true, prefix: true, startsExpr: true });

},{}],15:[function(dereq,module,exports){ “use strict”;

exports.__esModule = true; exports.isArray = isArray; exports.has = has;

function isArray(obj) {

return Object.prototype.toString.call(obj) === "[object Array]";

}

// Checks if an object has a property.

function has(obj, propName) {

return Object.prototype.hasOwnProperty.call(obj, propName);

}

},{}],16:[function(dereq,module,exports){ // Matches a whole line break (where CRLF is considered a single // line break). Used to count lines.

“use strict”;

exports.__esModule = true; exports.isNewLine = isNewLine; var lineBreak = /rn?|n|u2028|u2029/; exports.lineBreak = lineBreak; var lineBreakG = new RegExp(lineBreak.source, “g”);

exports.lineBreakG = lineBreakG;

function isNewLine(code) {

return code === 10 || code === 13 || code === 0x2028 || code == 0x2029;

}

var nonASCIIwhitespace = /[u1680u180eu2000-u200au202fu205fu3000ufeff]/;

exports.nonASCIIwhitespace = nonASCIIwhitespace; var skipWhiteSpace = /(?:s|//.*|/**?*/)*/g; exports.skipWhiteSpace = skipWhiteSpace;

},{}]},{},[3])(3) }); }).call(this,typeof global !== “undefined” ? global : typeof self !== “undefined” ? self : typeof window !== “undefined” ? window : {}) },{}],4:[function(require,module,exports){ /**

* @fileoverview The AST node types produced by the parser.
* @author Nicholas C. Zakas
*/

“use strict”;

//—————————————————————————— // Requirements //——————————————————————————

// None!

//—————————————————————————— // Public //——————————————————————————

module.exports = {

AssignmentExpression: "AssignmentExpression",
AssignmentPattern: "AssignmentPattern",
ArrayExpression: "ArrayExpression",
ArrayPattern: "ArrayPattern",
ArrowFunctionExpression: "ArrowFunctionExpression",
BlockStatement: "BlockStatement",
BinaryExpression: "BinaryExpression",
BreakStatement: "BreakStatement",
CallExpression: "CallExpression",
CatchClause: "CatchClause",
ClassBody: "ClassBody",
ClassDeclaration: "ClassDeclaration",
ClassExpression: "ClassExpression",
ConditionalExpression: "ConditionalExpression",
ContinueStatement: "ContinueStatement",
DoWhileStatement: "DoWhileStatement",
DebuggerStatement: "DebuggerStatement",
EmptyStatement: "EmptyStatement",
ExperimentalRestProperty: "ExperimentalRestProperty",
ExperimentalSpreadProperty: "ExperimentalSpreadProperty",
ExpressionStatement: "ExpressionStatement",
ForStatement: "ForStatement",
ForInStatement: "ForInStatement",
ForOfStatement: "ForOfStatement",
FunctionDeclaration: "FunctionDeclaration",
FunctionExpression: "FunctionExpression",
Identifier: "Identifier",
IfStatement: "IfStatement",
Literal: "Literal",
LabeledStatement: "LabeledStatement",
LogicalExpression: "LogicalExpression",
MemberExpression: "MemberExpression",
MetaProperty: "MetaProperty",
MethodDefinition: "MethodDefinition",
NewExpression: "NewExpression",
ObjectExpression: "ObjectExpression",
ObjectPattern: "ObjectPattern",
Program: "Program",
Property: "Property",
RestElement: "RestElement",
ReturnStatement: "ReturnStatement",
SequenceExpression: "SequenceExpression",
SpreadElement: "SpreadElement",
Super: "Super",
SwitchCase: "SwitchCase",
SwitchStatement: "SwitchStatement",
TaggedTemplateExpression: "TaggedTemplateExpression",
TemplateElement: "TemplateElement",
TemplateLiteral: "TemplateLiteral",
ThisExpression: "ThisExpression",
ThrowStatement: "ThrowStatement",
TryStatement: "TryStatement",
UnaryExpression: "UnaryExpression",
UpdateExpression: "UpdateExpression",
VariableDeclaration: "VariableDeclaration",
VariableDeclarator: "VariableDeclarator",
WhileStatement: "WhileStatement",
WithStatement: "WithStatement",
YieldExpression: "YieldExpression",
JSXIdentifier: "JSXIdentifier",
JSXNamespacedName: "JSXNamespacedName",
JSXMemberExpression: "JSXMemberExpression",
JSXEmptyExpression: "JSXEmptyExpression",
JSXExpressionContainer: "JSXExpressionContainer",
JSXElement: "JSXElement",
JSXClosingElement: "JSXClosingElement",
JSXOpeningElement: "JSXOpeningElement",
JSXAttribute: "JSXAttribute",
JSXSpreadAttribute: "JSXSpreadAttribute",
JSXText: "JSXText",
ExportDefaultDeclaration: "ExportDefaultDeclaration",
ExportNamedDeclaration: "ExportNamedDeclaration",
ExportAllDeclaration: "ExportAllDeclaration",
ExportSpecifier: "ExportSpecifier",
ImportDeclaration: "ImportDeclaration",
ImportSpecifier: "ImportSpecifier",
ImportDefaultSpecifier: "ImportDefaultSpecifier",
ImportNamespaceSpecifier: "ImportNamespaceSpecifier"

};

},{}],5:[function(require,module,exports){ /**

* @fileoverview Attaches comments to the AST.
* @author Nicholas C. Zakas
*/

“use strict”;

//—————————————————————————— // Requirements //——————————————————————————

var astNodeTypes = require(“./ast-node-types”);

//—————————————————————————— // Private //——————————————————————————

var extra = {

trailingComments: [],
leadingComments: [],
bottomRightStack: [],
previousNode: null

};

//—————————————————————————— // Public //——————————————————————————

module.exports = {

reset: function() {
    extra.trailingComments = [];
    extra.leadingComments = [];
    extra.bottomRightStack = [];
    extra.previousNode = null;
},

addComment: function(comment) {
    extra.trailingComments.push(comment);
    extra.leadingComments.push(comment);
},

processComment: function(node) {
    var lastChild,
        trailingComments,
        i,
        j;

    if (node.type === astNodeTypes.Program) {
        if (node.body.length > 0) {
            return;
        }
    }

    if (extra.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 then as official
         * trailingComments.
         */
        if (extra.trailingComments[0].range[0] >= node.range[1]) {
            trailingComments = extra.trailingComments;
            extra.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.
             */
            extra.trailingComments.length = 0;
        }
    } else {
        if (extra.bottomRightStack.length > 0 &&
                extra.bottomRightStack[extra.bottomRightStack.length - 1].trailingComments &&
                extra.bottomRightStack[extra.bottomRightStack.length - 1].trailingComments[0].range[0] >= node.range[1]) {
            trailingComments = extra.bottomRightStack[extra.bottomRightStack.length - 1].trailingComments;
            delete extra.bottomRightStack[extra.bottomRightStack.length - 1].trailingComments;
        }
    }

    // Eating the stack.
    while (extra.bottomRightStack.length > 0 && extra.bottomRightStack[extra.bottomRightStack.length - 1].range[0] >= node.range[0]) {
        lastChild = extra.bottomRightStack.pop();
    }

    if (lastChild) {
        if (lastChild.leadingComments) {
            if (lastChild.leadingComments[lastChild.leadingComments.length - 1].range[1] <= node.range[0]) {
                node.leadingComments = lastChild.leadingComments;
                delete lastChild.leadingComments;
            } else {
                // A leading comment for an anonymous class had been stolen by its first MethodDefinition,
                // 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].range[1] <= node.range[0]) {
                        node.leadingComments = lastChild.leadingComments.splice(0, i + 1);
                        break;
                    }
                }
            }
        }
    } else if (extra.leadingComments.length > 0) {
        if (extra.leadingComments[extra.leadingComments.length - 1].range[1] <= node.range[0]) {
            if (extra.previousNode) {
                for (j = 0; j < extra.leadingComments.length; j++) {
                    if (extra.leadingComments[j].end < extra.previousNode.end) {
                        extra.leadingComments.splice(j, 1);
                        j--;
                    }
                }
            }
            if (extra.leadingComments.length > 0) {
                node.leadingComments = extra.leadingComments;
                extra.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 extra step runs when the
             * bottomRightStack 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 < extra.leadingComments.length; i++) {
                if (extra.leadingComments[i].range[1] > node.range[0]) {
                    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 = extra.leadingComments.slice(0, i);
            if (node.leadingComments.length === 0) {
                delete node.leadingComments;
            }

            /*
             * Similarly, trailing comments are attached later. The variable
             * must be reset to null if there are no trailing comments.
             */
            trailingComments = extra.leadingComments.slice(i);
            if (trailingComments.length === 0) {
                trailingComments = null;
            }
        }
    }

    extra.previousNode = node;

    if (trailingComments) {
        node.trailingComments = trailingComments;
    }

    extra.bottomRightStack.push(node);
}

};

},{“./ast-node-types”:4}],6:[function(require,module,exports){ /**

* @fileoverview Translates tokens between Acorn format and Esprima format.
* @author Nicholas C. Zakas
*/

/* eslint no-underscore-dangle: 0 */

“use strict”;

//—————————————————————————— // Requirements //——————————————————————————

// none!

//—————————————————————————— // Private //——————————————————————————

// Esprima Token Types var Token = {

Boolean: "Boolean",
EOF: "<end>",
Identifier: "Identifier",
Keyword: "Keyword",
Null: "Null",
Numeric: "Numeric",
Punctuator: "Punctuator",
String: "String",
RegularExpression: "RegularExpression",
Template: "Template",
JSXIdentifier: "JSXIdentifier",
JSXText: "JSXText"

};

/**

* Converts part of a template into an Esprima token.
* @param {AcornToken[]} tokens The Acorn tokens representing the template.
* @param {string} code The source code.
* @returns {EsprimaToken} The Esprima equivalent of the template token.
* @private
*/

function convertTemplatePart(tokens, code) {

var firstToken = tokens[0],
    lastTemplateToken = tokens[tokens.length - 1];

var token = {
    type: Token.Template,
    value: code.slice(firstToken.start, lastTemplateToken.end)
};

if (firstToken.loc) {
    token.loc = {
        start: firstToken.loc.start,
        end: lastTemplateToken.loc.end
    };
}

if (firstToken.range) {
    token.range = [firstToken.range[0], lastTemplateToken.range[1]];
}

return token;

}

/**

* Contains logic to translate Acorn tokens into Esprima tokens.
* @param {Object} acornTokTypes The Acorn token types.
* @param {string} code The source code Acorn is parsing. This is necessary
*      to correct the "value" property of some tokens.
* @constructor
*/

function TokenTranslator(acornTokTypes, code) {

// token types
this._acornTokTypes = acornTokTypes;

// token buffer for templates
this._tokens = [];

// track the last curly brace
this._curlyBrace = null;

// the source code
this._code = code;

}

TokenTranslator.prototype = {

constructor: TokenTranslator,

/**
 * Translates a single Esprima token to a single Acorn token. This may be
 * inaccurate due to how templates are handled differently in Esprima and
 * Acorn, but should be accurate for all other tokens.
 * @param {AcornToken} token The Acorn token to translate.
 * @param {Object} extra Espree extra object.
 * @returns {EsprimaToken} The Esprima version of the token.
 */
translate: function(token, extra) {

    var type = token.type,
        tt = this._acornTokTypes;

    if (type === tt.name) {
        token.type = Token.Identifier;

        // TODO: See if this is an Acorn bug
        if (token.value === "static") {
            token.type = Token.Keyword;
        }

        if (extra.ecmaVersion > 5 && (token.value === "yield" || token.value === "let")) {
            token.type = Token.Keyword;
        }

    } else if (type === tt.semi || type === tt.comma ||
             type === tt.parenL || type === tt.parenR ||
             type === tt.braceL || type === tt.braceR ||
             type === tt.dot || type === tt.bracketL ||
             type === tt.colon || type === tt.question ||
             type === tt.bracketR || type === tt.ellipsis ||
             type === tt.arrow || type === tt.jsxTagStart ||
             type === tt.incDec || type === tt.starstar ||
             type === tt.jsxTagEnd || (type.binop && !type.keyword) ||
             type.isAssign) {

        token.type = Token.Punctuator;
        token.value = this._code.slice(token.start, token.end);
    } else if (type === tt.jsxName) {
        token.type = Token.JSXIdentifier;
    } else if (type.label === "jsxText" || type === tt.jsxAttrValueToken) {
        token.type = Token.JSXText;
    } else if (type.keyword) {
        if (type.keyword === "true" || type.keyword === "false") {
            token.type = Token.Boolean;
        } else if (type.keyword === "null") {
            token.type = Token.Null;
        } else {
            token.type = Token.Keyword;
        }
    } else if (type === tt.num) {
        token.type = Token.Numeric;
        token.value = this._code.slice(token.start, token.end);
    } else if (type === tt.string) {

        if (extra.jsxAttrValueToken) {
            extra.jsxAttrValueToken = false;
            token.type = Token.JSXText;
        } else {
            token.type = Token.String;
        }

        token.value = this._code.slice(token.start, token.end);
    } else if (type === tt.regexp) {
        token.type = Token.RegularExpression;
        var value = token.value;
        token.regex = {
            flags: value.flags,
            pattern: value.pattern
        };
        token.value = "/" + value.pattern + "/" + value.flags;
    }

    return token;
},

/**
 * Function to call during Acorn's onToken handler.
 * @param {AcornToken} token The Acorn token.
 * @param {Object} extra The Espree extra object.
 * @returns {void}
 */
onToken: function(token, extra) {

    var that = this,
        tt = this._acornTokTypes,
        tokens = extra.tokens,
        templateTokens = this._tokens;

    /**
     * Flushes the buffered template tokens and resets the template
     * tracking.
     * @returns {void}
     * @private
     */
    function translateTemplateTokens() {
        tokens.push(convertTemplatePart(that._tokens, that._code));
        that._tokens = [];
    }

    if (token.type === tt.eof) {

        // might be one last curlyBrace
        if (this._curlyBrace) {
            tokens.push(this.translate(this._curlyBrace, extra));
        }

        return;
    }

    if (token.type === tt.backQuote) {
        templateTokens.push(token);

        // it's the end
        if (templateTokens.length > 1) {
            translateTemplateTokens();
        }

        return;
    } else if (token.type === tt.dollarBraceL) {
        templateTokens.push(token);
        translateTemplateTokens();
        return;
    } else if (token.type === tt.braceR) {

        // if there's already a curly, it's not part of the template
        if (this._curlyBrace) {

            tokens.push(this.translate(this._curlyBrace, extra));
        }

        // store new curly for later
        this._curlyBrace = token;
        return;
    } else if (token.type === tt.template) {
        if (this._curlyBrace) {
            templateTokens.push(this._curlyBrace);
            this._curlyBrace = null;
        }

        templateTokens.push(token);
        return;
    }

    if (this._curlyBrace) {
        tokens.push(this.translate(this._curlyBrace, extra));
        this._curlyBrace = null;
    }

    tokens.push(this.translate(token, extra));
}

};

//—————————————————————————— // Public //——————————————————————————

module.exports = TokenTranslator;

},{}],7:[function(require,module,exports){ /**

* @fileoverview The visitor keys for the node types Espree supports
* @author Nicholas C. Zakas
*
* This file contains code from estraverse-fb.
*
* The MIT license. Copyright (c) 2014 Ingvar Stepanyan
*
* 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.
*/

“use strict”;

//—————————————————————————— // Requirements //——————————————————————————

// None!

//—————————————————————————— // Public //——————————————————————————

module.exports = {

// ECMAScript
AssignmentExpression: ["left", "right"],
AssignmentPattern: ["left", "right"],
ArrayExpression: ["elements"],
ArrayPattern: ["elements"],
ArrowFunctionExpression: ["params", "body"],
BlockStatement: ["body"],
BinaryExpression: ["left", "right"],
BreakStatement: ["label"],
CallExpression: ["callee", "arguments"],
CatchClause: ["param", "body"],
ClassBody: ["body"],
ClassDeclaration: ["id", "superClass", "body"],
ClassExpression: ["id", "superClass", "body"],
ConditionalExpression: ["test", "consequent", "alternate"],
ContinueStatement: ["label"],
DebuggerStatement: [],
DirectiveStatement: [],
DoWhileStatement: ["body", "test"],
EmptyStatement: [],
ExportAllDeclaration: ["source"],
ExportDefaultDeclaration: ["declaration"],
ExportNamedDeclaration: ["declaration", "specifiers", "source"],
ExportSpecifier: ["exported", "local"],
ExpressionStatement: ["expression"],
ForStatement: ["init", "test", "update", "body"],
ForInStatement: ["left", "right", "body"],
ForOfStatement: ["left", "right", "body"],
FunctionDeclaration: ["id", "params", "body"],
FunctionExpression: ["id", "params", "body"],
Identifier: [],
IfStatement: ["test", "consequent", "alternate"],
ImportDeclaration: ["specifiers", "source"],
ImportDefaultSpecifier: ["local"],
ImportNamespaceSpecifier: ["local"],
ImportSpecifier: ["imported", "local"],
Literal: [],
LabeledStatement: ["label", "body"],
LogicalExpression: ["left", "right"],
MemberExpression: ["object", "property"],
MetaProperty: ["meta", "property"],
MethodDefinition: ["key", "value"],
ModuleSpecifier: [],
NewExpression: ["callee", "arguments"],
ObjectExpression: ["properties"],
ObjectPattern: ["properties"],
Program: ["body"],
Property: ["key", "value"],
RestElement: [ "argument" ],
ReturnStatement: ["argument"],
SequenceExpression: ["expressions"],
SpreadElement: ["argument"],
Super: [],
SwitchStatement: ["discriminant", "cases"],
SwitchCase: ["test", "consequent"],
TaggedTemplateExpression: ["tag", "quasi"],
TemplateElement: [],
TemplateLiteral: ["quasis", "expressions"],
ThisExpression: [],
ThrowStatement: ["argument"],
TryStatement: ["block", "handler", "finalizer"],
UnaryExpression: ["argument"],
UpdateExpression: ["argument"],
VariableDeclaration: ["declarations"],
VariableDeclarator: ["id", "init"],
WhileStatement: ["test", "body"],
WithStatement: ["object", "body"],
YieldExpression: ["argument"],

// JSX
JSXIdentifier: [],
JSXNamespacedName: ["namespace", "name"],
JSXMemberExpression: ["object", "property"],
JSXEmptyExpression: [],
JSXExpressionContainer: ["expression"],
JSXElement: ["openingElement", "closingElement", "children"],
JSXClosingElement: ["name"],
JSXOpeningElement: ["name", "attributes"],
JSXAttribute: ["name", "value"],
JSXText: null,
JSXSpreadAttribute: ["argument"],

// Experimental features
ExperimentalRestProperty: ["argument"],
ExperimentalSpreadProperty: ["argument"]

};

},{}],8:[function(require,module,exports){ module.exports={

"_args": [
  [
    {
      "name": "espree",
      "raw": "espree@3.1.4",
      "rawSpec": "3.1.4",
      "scope": null,
      "spec": "3.1.4",
      "type": "version"
    },
    "/Users/dennis/Projects/eslintrb/vendor/eslint"
  ]
],
"_from": "espree@3.1.4",
"_id": "espree@3.1.4",
"_inCache": true,
"_installable": true,
"_location": "/espree",
"_nodeVersion": "4.4.2",
"_npmOperationalInternal": {
  "host": "packages-16-east.internal.npmjs.com",
  "tmp": "tmp/espree-3.1.4.tgz_1461264685938_0.4520344687625766"
},
"_npmUser": {
  "email": "nicholas@nczconsulting.com",
  "name": "nzakas"
},
"_npmVersion": "2.15.0",
"_phantomChildren": {},
"_requested": {
  "name": "espree",
  "raw": "espree@3.1.4",
  "rawSpec": "3.1.4",
  "scope": null,
  "spec": "3.1.4",
  "type": "version"
},
"_requiredBy": [
  "/"
],
"_resolved": "https://registry.npmjs.org/espree/-/espree-3.1.4.tgz",
"_shasum": "0726d7ac83af97a7c8498da9b363a3609d2a68a1",
"_shrinkwrap": null,
"_spec": "espree@3.1.4",
"_where": "/Users/dennis/Projects/eslintrb/vendor/eslint",
"author": {
  "email": "nicholas+npm@nczconsulting.com",
  "name": "Nicholas C. Zakas"
},
"bugs": {
  "url": "http://github.com/eslint/espree.git"
},
"dependencies": {
  "acorn": "^3.1.0",
  "acorn-jsx": "^3.0.0"
},
"description": "An Esprima-compatible JavaScript parser built on Acorn",
"devDependencies": {
  "browserify": "^7.0.0",
  "chai": "^1.10.0",
  "eslint": "^2.0.0-beta.1",
  "eslint-config-eslint": "^3.0.0",
  "eslint-release": "^0.3.0",
  "esprima": "latest",
  "esprima-fb": "^8001.2001.0-dev-harmony-fb",
  "istanbul": "~0.2.6",
  "json-diff": "~0.3.1",
  "leche": "^1.0.1",
  "mocha": "^2.0.1",
  "regenerate": "~0.5.4",
  "shelljs": "^0.3.0",
  "shelljs-nodecli": "^0.1.1",
  "unicode-6.3.0": "~0.1.0"
},
"directories": {},
"dist": {
  "shasum": "0726d7ac83af97a7c8498da9b363a3609d2a68a1",
  "tarball": "https://registry.npmjs.org/espree/-/espree-3.1.4.tgz"
},
"engines": {
  "node": ">=0.10.0"
},
"files": [
  "lib",
  "espree.js"
],
"gitHead": "72ef3f4a332d6f8bfb32a55573eacb06f65e7f11",
"homepage": "https://github.com/eslint/espree",
"keywords": [
  "ast",
  "ecmascript",
  "javascript",
  "parser",
  "syntax",
  "acorn"
],
"license": "BSD-2-Clause",
"main": "espree.js",
"maintainers": [
  {
    "email": "nicholas@nczconsulting.com",
    "name": "nzakas"
  }
],
"name": "espree",
"optionalDependencies": {},
"readme": "ERROR: No README data found!",
"repository": {
  "type": "git",
  "url": "git+ssh://git@github.com/eslint/espree.git"
},
"scripts": {
  "alpharelease": "eslint-prelease alpha",
  "betarelease": "eslint-prelease beta",
  "browserify": "node Makefile.js browserify",
  "generate-regex": "node tools/generate-identifier-regex.js",
  "lint": "node Makefile.js lint",
  "release": "eslint-release",
  "test": "npm run-script lint && node Makefile.js test"
},
"version": "3.1.4"

}

},{}],“espree”:[function(require,module,exports){ /**

* @fileoverview Main Espree file that converts Acorn into Esprima output.
*
* This file contains code from the following MIT-licensed projects:
* 1. Acorn
* 2. Babylon
* 3. Babel-ESLint
*
* This file also contains code from Esprima, which is BSD licensed.
*
* Acorn is Copyright 2012-2015 Acorn Contributors (https://github.com/marijnh/acorn/blob/master/AUTHORS)
* Babylon is Copyright 2014-2015 various contributors (https://github.com/babel/babel/blob/master/packages/babylon/AUTHORS)
* Babel-ESLint is Copyright 2014-2015 Sebastian McKenzie <sebmck@gmail.com>
*
* 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 <COPYRIGHT HOLDER> 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.
*
* Esprima is Copyright (c) jQuery Foundation, Inc. and Contributors, All Rights Reserved.
*
* 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 <COPYRIGHT HOLDER> 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.
*/

/* eslint no-undefined:0, no-use-before-define: 0 */

“use strict”;

var astNodeTypes = require(“./lib/ast-node-types”),

commentAttachment = require("./lib/comment-attachment"),
TokenTranslator = require("./lib/token-translator"),
acornJSX = require("acorn-jsx/inject"),
rawAcorn = require("acorn");

var acorn = acornJSX(rawAcorn);

var lookahead,

extra,
lastToken;

/**

* Resets the extra object to its default.
* @returns {void}
* @private
*/

function resetExtra() {

extra = {
    tokens: null,
    range: false,
    loc: false,
    comment: false,
    comments: [],
    tolerant: false,
    errors: [],
    strict: false,
    ecmaFeatures: {},
    ecmaVersion: 5,
    isModule: false
};

}

var tt = acorn.tokTypes,

getLineInfo = acorn.getLineInfo;

// custom type for JSX attribute values tt.jsxAttrValueToken = {};

/**

* Determines if a node is valid given the set of ecmaFeatures.
* @param {ASTNode} node The node to check.
* @returns {boolean} True if the node is allowed, false if not.
* @private
*/

function isValidNode(node) {

var ecma = extra.ecmaFeatures;

switch (node.type) {
    case "ExperimentalSpreadProperty":
    case "ExperimentalRestProperty":
        return ecma.experimentalObjectRestSpread;

    case "ImportDeclaration":
    case "ExportNamedDeclaration":
    case "ExportDefaultDeclaration":
    case "ExportAllDeclaration":
        return extra.isModule;

    default:
        return true;
}

}

/**

* Performs last-minute Esprima-specific compatibility checks and fixes.
* @param {ASTNode} result The node to check.
* @returns {ASTNode} The finished node.
* @private
* @this acorn.Parser
*/

function esprimaFinishNode(result) {

// ensure that parsed node was allowed through ecmaFeatures
if (!isValidNode(result)) {
    this.unexpected(result.start);
}

// https://github.com/marijnh/acorn/issues/323
if (result.type === "TryStatement") {
    delete result.guardedHandlers;
} else if (result.type === "CatchClause") {
    delete result.guard;
}

// Acorn doesn't count the opening and closing backticks as part of templates
// so we have to adjust ranges/locations appropriately.
if (result.type === "TemplateElement") {

    // additional adjustment needed if ${ is the last token
    var terminalDollarBraceL = this.input.slice(result.end, result.end + 2) === "${";

    if (result.range) {
        result.range[0]--;
        result.range[1] += (terminalDollarBraceL ? 2 : 1);
    }

    if (result.loc) {
        result.loc.start.column--;
        result.loc.end.column += (terminalDollarBraceL ? 2 : 1);
    }
}

// Acorn currently uses expressions instead of declarations in default exports
if (result.type === "ExportDefaultDeclaration") {
    if (/^(Class|Function)Expression$/.test(result.declaration.type)) {
        result.declaration.type = result.declaration.type.replace("Expression", "Declaration");
    }
}

// Acorn uses undefined instead of null, which affects serialization
if (result.type === "Literal" && result.value === undefined) {
    result.value = null;
}

if (extra.attachComment) {
    commentAttachment.processComment(result);
}

if (result.type.indexOf("Function") > -1 && !result.generator) {
    result.generator = false;
}

return result;

}

/**

* Determines if a token is valid given the set of ecmaFeatures.
* @param {acorn.Parser} parser The parser to check.
* @returns {boolean} True if the token is allowed, false if not.
* @private
*/

function isValidToken(parser) {

var ecma = extra.ecmaFeatures;
var type = parser.type;

switch (type) {
    case tt.jsxName:
    case tt.jsxText:
    case tt.jsxTagStart:
    case tt.jsxTagEnd:
        return ecma.jsx;

    // https://github.com/ternjs/acorn/issues/363
    case tt.regexp:
        if (extra.ecmaVersion < 6 && parser.value.flags && parser.value.flags.indexOf("y") > -1) {
            return false;
        }

        return true;

    default:
        return true;
}

}

/**

* Injects esprimaFinishNode into the finishNode process.
* @param {Function} finishNode Original finishNode function.
* @returns {ASTNode} The finished node.
* @private
*/

function wrapFinishNode(finishNode) {

return /** @this acorn.Parser */ function(node, type, pos, loc) {
    var result = finishNode.call(this, node, type, pos, loc);
    return esprimaFinishNode.call(this, result);
};

}

acorn.plugins.espree = function(instance) {

instance.extend("finishNode", wrapFinishNode);

instance.extend("finishNodeAt", wrapFinishNode);

instance.extend("next", function(next) {
    return /** @this acorn.Parser */ function() {
        if (!isValidToken(this)) {
            this.unexpected();
        }
        return next.call(this);
    };
});

// needed for experimental object rest/spread
instance.extend("checkLVal", function(checkLVal) {

    return /** @this acorn.Parser */ function(expr, isBinding, checkClashes) {

        if (extra.ecmaFeatures.experimentalObjectRestSpread && expr.type === "ObjectPattern") {
            for (var i = 0; i < expr.properties.length; i++) {
                if (expr.properties[i].type.indexOf("Experimental") === -1) {
                    this.checkLVal(expr.properties[i].value, isBinding, checkClashes);
                }
            }
            return undefined;
        }

        return checkLVal.call(this, expr, isBinding, checkClashes);
    };
});

instance.extend("parseTopLevel", function(parseTopLevel) {
    return /** @this acorn.Parser */ function(node) {
        if (extra.ecmaFeatures.impliedStrict && this.options.ecmaVersion >= 5) {
            this.strict = true;
        }
        return parseTopLevel.call(this, node);
    };
});

instance.extend("toAssignable", function(toAssignable) {

    return /** @this acorn.Parser */ function(node, isBinding) {

        if (extra.ecmaFeatures.experimentalObjectRestSpread &&
                node.type === "ObjectExpression"
        ) {
            node.type = "ObjectPattern";

            for (var i = 0; i < node.properties.length; i++) {
                var prop = node.properties[i];

                if (prop.type === "ExperimentalSpreadProperty") {
                    prop.type = "ExperimentalRestProperty";
                } else if (prop.kind !== "init") {
                    this.raise(prop.key.start, "Object pattern can't contain getter or setter");
                } else {
                    this.toAssignable(prop.value, isBinding);
                }
            }

            return node;
        } else {
            return toAssignable.call(this, node, isBinding);
        }
    };

});

/**
 * Method to parse an object rest or object spread.
 * @returns {ASTNode} The node representing object rest or object spread.
 * @this acorn.Parser
 */
instance.parseObjectRest = function() {
    var node = this.startNode();
    this.next();
    node.argument = this.parseIdent();
    return this.finishNode(node, "ExperimentalRestProperty");
};

/**
 * Method to parse an object with object rest or object spread.
 * @param {boolean} isPattern True if the object is a destructuring pattern.
 * @param {Object} refShorthandDefaultPos ?
 * @returns {ASTNode} The node representing object rest or object spread.
 * @this acorn.Parser
 */
instance.parseObj = function(isPattern, refShorthandDefaultPos) {
    var node = this.startNode(),
        first = true,
        propHash = {};
    node.properties = [];
    this.next();
    while (!this.eat(tt.braceR)) {

        if (!first) {
            this.expect(tt.comma);

            if (this.afterTrailingComma(tt.braceR)) {
                break;
            }

        } else {
            first = false;
        }

        var prop = this.startNode(),
            isGenerator,
            startPos,
            startLoc;

        if (extra.ecmaFeatures.experimentalObjectRestSpread && this.type === tt.ellipsis) {
            if (isPattern) {
                prop = this.parseObjectRest();
            } else {
                prop = this.parseSpread();
                prop.type = "ExperimentalSpreadProperty";
            }

            node.properties.push(prop);
            continue;
        }

        if (this.options.ecmaVersion >= 6) {
            prop.method = false;
            prop.shorthand = false;

            if (isPattern || refShorthandDefaultPos) {
                startPos = this.start;
                startLoc = this.startLoc;
            }

            if (!isPattern) {
                isGenerator = this.eat(tt.star);
            }
        }

        this.parsePropertyName(prop);
        this.parsePropertyValue(prop, isPattern, isGenerator, startPos, startLoc, refShorthandDefaultPos);
        this.checkPropClash(prop, propHash);
        node.properties.push(this.finishNode(prop, "Property"));
    }

    return this.finishNode(node, isPattern ? "ObjectPattern" : "ObjectExpression");
};

/**
 * Overwrites the default raise method to throw Esprima-style errors.
 * @param {int} pos The position of the error.
 * @param {string} message The error message.
 * @throws {SyntaxError} A syntax error.
 * @returns {void}
 */
instance.raise = instance.raiseRecoverable = function(pos, message) {
    var loc = getLineInfo(this.input, pos);
    var err = new SyntaxError(message);
    err.index = pos;
    err.lineNumber = loc.line;
    err.column = loc.column + 1; // acorn uses 0-based columns
    throw err;
};

/**
 * Overwrites the default unexpected method to throw Esprima-style errors.
 * @param {int} pos The position of the error.
 * @throws {SyntaxError} A syntax error.
 * @returns {void}
 */
instance.unexpected = function(pos) {
    var message = "Unexpected token";

    if (pos !== null && pos !== undefined) {
        this.pos = pos;

        if (this.options.locations) {
            while (this.pos < this.lineStart) {
                this.lineStart = this.input.lastIndexOf("\n", this.lineStart - 2) + 1;
                --this.curLine;
            }
        }

        this.nextToken();
    }

    if (this.end > this.start) {
        message += " " + this.input.slice(this.start, this.end);
    }

    this.raise(this.start, message);
};

/*
* Esprima-FB represents JSX strings as tokens called "JSXText", but Acorn-JSX
* uses regular tt.string without any distinction between this and regular JS
* strings. As such, we intercept an attempt to read a JSX string and set a flag
* on extra so that when tokens are converted, the next token will be switched
* to JSXText via onToken.
*/
instance.extend("jsx_readString", function(jsxReadString) {
    return /** @this acorn.Parser */ function(quote) {
        var result = jsxReadString.call(this, quote);
        if (this.type === tt.string) {
            extra.jsxAttrValueToken = true;
        }

        return result;
    };
});

};

//—————————————————————————— // Tokenizer //——————————————————————————

/**

* Tokenizes the given code.
* @param {string} code The code to tokenize.
* @param {Object} options Options defining how to tokenize.
* @returns {Token[]} An array of tokens.
* @throws {SyntaxError} If the input code is invalid.
* @private
*/

function tokenize(code, options) {

var toString,
    tokens,
    impliedStrict,
    translator = new TokenTranslator(tt, code);

toString = String;
if (typeof code !== "string" && !(code instanceof String)) {
    code = toString(code);
}

lookahead = null;

// Options matching.
options = options || {};

var acornOptions = {
    ecmaVersion: 5,
    plugins: {
        espree: true
    }
};

resetExtra();

// Of course we collect tokens here.
options.tokens = true;
extra.tokens = [];

extra.range = (typeof options.range === "boolean") && options.range;
acornOptions.ranges = extra.range;

extra.loc = (typeof options.loc === "boolean") && options.loc;
acornOptions.locations = extra.loc;

extra.comment = typeof options.comment === "boolean" && options.comment;

if (extra.comment) {
    acornOptions.onComment = function() {
        var comment = convertAcornCommentToEsprimaComment.apply(this, arguments);
        extra.comments.push(comment);
    };
}

extra.tolerant = typeof options.tolerant === "boolean" && options.tolerant;

if (typeof options.ecmaVersion === "number") {
    switch (options.ecmaVersion) {
        case 3:
        case 5:
        case 6:
        case 7:
            acornOptions.ecmaVersion = options.ecmaVersion;
            extra.ecmaVersion = options.ecmaVersion;
            break;

        default:
            throw new Error("ecmaVersion must be 3, 5, 6, or 7.");
    }
}

// apply parsing flags
if (options.ecmaFeatures && typeof options.ecmaFeatures === "object") {
    extra.ecmaFeatures = options.ecmaFeatures;
    impliedStrict = extra.ecmaFeatures.impliedStrict;
    extra.ecmaFeatures.impliedStrict = typeof impliedStrict === "boolean" && impliedStrict;
}

try {
    var tokenizer = acorn.tokenizer(code, acornOptions);
    while ((lookahead = tokenizer.getToken()).type !== tt.eof) {
        translator.onToken(lookahead, extra);
    }

    // filterTokenLocation();
    tokens = extra.tokens;

    if (extra.comment) {
        tokens.comments = extra.comments;
    }
    if (extra.tolerant) {
        tokens.errors = extra.errors;
    }
} catch (e) {
    throw e;
}
return tokens;

}

//—————————————————————————— // Parser //——————————————————————————

/**

* Converts an Acorn comment to a Esprima comment.
* @param {boolean} block True if it's a block comment, false if not.
* @param {string} text The text of the comment.
* @param {int} start The index at which the comment starts.
* @param {int} end The index at which the comment ends.
* @param {Location} startLoc The location at which the comment starts.
* @param {Location} endLoc The location at which the comment ends.
* @returns {Object} The comment object.
* @private
*/

function convertAcornCommentToEsprimaComment(block, text, start, end, startLoc, endLoc) {

var comment = {
    type: block ? "Block" : "Line",
    value: text
};

if (typeof start === "number") {
    comment.start = start;
    comment.end = end;
    comment.range = [start, end];
}

if (typeof startLoc === "object") {
    comment.loc = {
        start: startLoc,
        end: endLoc
    };
}

return comment;

}

/**

* Parses the given code.
* @param {string} code The code to tokenize.
* @param {Object} options Options defining how to tokenize.
* @returns {ASTNode} The "Program" AST node.
* @throws {SyntaxError} If the input code is invalid.
* @private
*/

function parse(code, options) {

var program,
    toString = String,
    translator,
    impliedStrict,
    acornOptions = {
        ecmaVersion: 5,
        plugins: {
            espree: true
        }
    };

lastToken = null;

if (typeof code !== "string" && !(code instanceof String)) {
    code = toString(code);
}

resetExtra();
commentAttachment.reset();

if (typeof options !== "undefined") {
    extra.range = (typeof options.range === "boolean") && options.range;
    extra.loc = (typeof options.loc === "boolean") && options.loc;
    extra.attachComment = (typeof options.attachComment === "boolean") && options.attachComment;

    if (extra.loc && options.source !== null && options.source !== undefined) {
        extra.source = toString(options.source);
    }

    if (typeof options.tokens === "boolean" && options.tokens) {
        extra.tokens = [];
        translator = new TokenTranslator(tt, code);
    }
    if (typeof options.comment === "boolean" && options.comment) {
        extra.comment = true;
        extra.comments = [];
    }
    if (typeof options.tolerant === "boolean" && options.tolerant) {
        extra.errors = [];
    }
    if (extra.attachComment) {
        extra.range = true;
        extra.comments = [];
        commentAttachment.reset();
    }

    if (typeof options.ecmaVersion === "number") {
        switch (options.ecmaVersion) {
            case 3:
            case 5:
            case 6:
            case 7:
                acornOptions.ecmaVersion = options.ecmaVersion;
                extra.ecmaVersion = options.ecmaVersion;
                break;

            default:
                throw new Error("ecmaVersion must be 3, 5, 6, or 7.");
        }
    }

    if (options.sourceType === "module") {
        extra.isModule = true;

        // modules must be in 6 at least
        if (acornOptions.ecmaVersion < 6) {
            acornOptions.ecmaVersion = 6;
            extra.ecmaVersion = 6;
        }

        acornOptions.sourceType = "module";
    }

    // apply parsing flags after sourceType to allow overriding
    if (options.ecmaFeatures && typeof options.ecmaFeatures === "object") {
        extra.ecmaFeatures = options.ecmaFeatures;
        impliedStrict = extra.ecmaFeatures.impliedStrict;
        extra.ecmaFeatures.impliedStrict = typeof impliedStrict === "boolean" && impliedStrict;
        if (options.ecmaFeatures.globalReturn) {
            acornOptions.allowReturnOutsideFunction = true;
        }
    }

    acornOptions.onToken = function(token) {
        if (extra.tokens) {
            translator.onToken(token, extra);
        }
        if (token.type !== tt.eof) {
            lastToken = token;
        }
    };

    if (extra.attachComment || extra.comment) {
        acornOptions.onComment = function() {
            var comment = convertAcornCommentToEsprimaComment.apply(this, arguments);
            extra.comments.push(comment);

            if (extra.attachComment) {
                commentAttachment.addComment(comment);
            }
        };
    }

    if (extra.range) {
        acornOptions.ranges = true;
    }

    if (extra.loc) {
        acornOptions.locations = true;
    }

    if (extra.ecmaFeatures.jsx) {
        // Should process jsx plugin before espree plugin.
        acornOptions.plugins = {
            jsx: true,
            espree: true
        };
    }
}

program = acorn.parse(code, acornOptions);
program.sourceType = extra.isModule ? "module" : "script";

if (extra.comment || extra.attachComment) {
    program.comments = extra.comments;
}

if (extra.tokens) {
    program.tokens = extra.tokens;
}

/*
 * Adjust opening and closing position of program to match Esprima.
 * Acorn always starts programs at range 0 whereas Esprima starts at the
 * first AST node's start (the only real difference is when there's leading
 * whitespace or leading comments). Acorn also counts trailing whitespace
 * as part of the program whereas Esprima only counts up to the last token.
 */
if (program.range) {
    program.range[0] = program.body.length ? program.body[0].range[0] : program.range[0];
    program.range[1] = lastToken ? lastToken.range[1] : program.range[1];
}

if (program.loc) {
    program.loc.start = program.body.length ? program.body[0].loc.start : program.loc.start;
    program.loc.end = lastToken ? lastToken.loc.end : program.loc.end;
}

return program;

}

//—————————————————————————— // Public //——————————————————————————

exports.version = require(“./package.json”).version;

exports.tokenize = tokenize;

exports.parse = parse;

// Deep copy. /* istanbul ignore next */ exports.Syntax = (function() {

var name, types = {};

if (typeof Object.create === "function") {
    types = Object.create(null);
}

for (name in astNodeTypes) {
    if (astNodeTypes.hasOwnProperty(name)) {
        types[name] = astNodeTypes[name];
    }
}

if (typeof Object.freeze === "function") {
    Object.freeze(types);
}

return types;

}());

/* istanbul ignore next */ exports.VisitorKeys = (function() {

var visitorKeys = require("./lib/visitor-keys");
var name,
    keys = {};

if (typeof Object.create === "function") {
    keys = Object.create(null);
}

for (name in visitorKeys) {
    if (visitorKeys.hasOwnProperty(name)) {
        keys[name] = visitorKeys[name];
    }
}

if (typeof Object.freeze === "function") {
    Object.freeze(keys);
}

return keys;

}());

},{“./lib/ast-node-types”:4,“./lib/comment-attachment”:5,“./lib/token-translator”:6,“./lib/visitor-keys”:7,“./package.json”:8,“acorn”:3,“acorn-jsx/inject”:1}]},{},[]);

(function(f){if(typeof exports===“object”&&typeof module!==“undefined”){module.exports=f()}else if(typeof define===“function”&&define.amd){define([],f)}else{var g;if(typeof window!==“undefined”){g=window}else if(typeof global!==“undefined”){g=global}else if(typeof self!==“undefined”){g=self}else{g=this}g.eslint = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n){if(!t){var a=typeof require==“function”&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(“Cannot find module ‘”o“’”);throw f.code=“MODULE_NOT_FOUND”,f}var l=n={exports:{}};t[0].call(l.exports,function(e){var n=t[1];return s(n?n:e)},l,l.exports,e,t,n,r)}return n.exports}var i=typeof require==“function”&&require;for(var o=0;o);return s})({1:[function(require,module,exports){ module.exports={

"type": "Program",
"body": [],
"sourceType": "script",
"range": [
  0,
  0
],
"loc": {
  "start": {
    "line": 0,
    "column": 0
  },
  "end": {
    "line": 0,
    "column": 0
  }
},
"comments": [],
"tokens": []

}

},{}],2:[function(require,module,exports){ /**

* @fileoverview Defines environment settings and globals.
* @author Elan Shanker
*/

“use strict”;

//—————————————————————————— // Requirements //——————————————————————————

var globals = require(“globals”);

//—————————————————————————— // Public Interface //——————————————————————————

module.exports = {

builtin: globals.es5,
browser: {
    globals: globals.browser
},
node: {
    globals: globals.node,
    parserOptions: {
        ecmaFeatures: {
            globalReturn: true
        }
    }
},
commonjs: {
    globals: globals.commonjs,
    parserOptions: {
        ecmaFeatures: {
            globalReturn: true
        }
    }
},
"shared-node-browser": {
    globals: globals["shared-node-browser"]
},
worker: {
    globals: globals.worker
},
amd: {
    globals: globals.amd
},
mocha: {
    globals: globals.mocha
},
jasmine: {
    globals: globals.jasmine
},
jest: {
    globals: globals.jest
},
phantomjs: {
    globals: globals.phantomjs
},
jquery: {
    globals: globals.jquery
},
qunit: {
    globals: globals.qunit
},
prototypejs: {
    globals: globals.prototypejs
},
shelljs: {
    globals: globals.shelljs
},
meteor: {
    globals: globals.meteor
},
mongo: {
    globals: globals.mongo
},
protractor: {
    globals: globals.protractor
},
applescript: {
    globals: globals.applescript
},
nashorn: {
    globals: globals.nashorn
},
serviceworker: {
    globals: globals.serviceworker
},
atomtest: {
    globals: globals.atomtest
},
embertest: {
    globals: globals.embertest
},
webextensions: {
    globals: globals.webextensions
},
es6: {
    globals: globals.es6,
    parserOptions: {
        ecmaVersion: 6
    }
},
greasemonkey: {
    globals: globals.greasemonkey
}

};

},{“globals”:98}],3:[function(require,module,exports){ module.exports={

"parser": "espree",
"ecmaFeatures": {},
"rules": {
    "no-alert": "off",
    "no-array-constructor": "off",
    "no-bitwise": "off",
    "no-caller": "off",
    "no-case-declarations": "error",
    "no-catch-shadow": "off",
    "no-class-assign": "error",
    "no-cond-assign": "error",
    "no-confusing-arrow": "off",
    "no-console": "error",
    "no-const-assign": "error",
    "no-constant-condition": "error",
    "no-continue": "off",
    "no-control-regex": "error",
    "no-debugger": "error",
    "no-delete-var": "error",
    "no-div-regex": "off",
    "no-dupe-args": "error",
    "no-dupe-class-members": "error",
    "no-dupe-keys": "error",
    "no-duplicate-case": "error",
    "no-duplicate-imports": "off",
    "no-else-return": "off",
    "no-empty": "error",
    "no-empty-character-class": "error",
    "no-empty-function": "off",
    "no-empty-pattern": "error",
    "no-eq-null": "off",
    "no-eval": "off",
    "no-ex-assign": "error",
    "no-extend-native": "off",
    "no-extra-bind": "off",
    "no-extra-boolean-cast": "error",
    "no-extra-label": "off",
    "no-extra-parens": "off",
    "no-extra-semi": "error",
    "no-fallthrough": "error",
    "no-floating-decimal": "off",
    "no-func-assign": "error",
    "no-implicit-coercion": "off",
    "no-implicit-globals": "off",
    "no-implied-eval": "off",
    "no-inline-comments": "off",
    "no-inner-declarations": "error",
    "no-invalid-regexp": "error",
    "no-invalid-this": "off",
    "no-irregular-whitespace": "error",
    "no-iterator": "off",
    "no-label-var": "off",
    "no-labels": "off",
    "no-lone-blocks": "off",
    "no-lonely-if": "off",
    "no-loop-func": "off",
    "no-magic-numbers": "off",
    "no-mixed-operators": "off",
    "no-mixed-requires": "off",
    "no-mixed-spaces-and-tabs": "error",
    "no-multi-spaces": "off",
    "no-multi-str": "off",
    "no-multiple-empty-lines": "off",
    "no-native-reassign": "off",
    "no-negated-condition": "off",
    "no-negated-in-lhs": "error",
    "no-nested-ternary": "off",
    "no-new": "off",
    "no-new-func": "off",
    "no-new-object": "off",
    "no-new-require": "off",
    "no-new-symbol": "error",
    "no-new-wrappers": "off",
    "no-obj-calls": "error",
    "no-octal": "error",
    "no-octal-escape": "off",
    "no-param-reassign": "off",
    "no-path-concat": "off",
    "no-plusplus": "off",
    "no-process-env": "off",
    "no-process-exit": "off",
    "no-proto": "off",
    "no-prototype-builtins": "off",
    "no-redeclare": "error",
    "no-regex-spaces": "error",
    "no-restricted-globals": "off",
    "no-restricted-imports": "off",
    "no-restricted-modules": "off",
    "no-restricted-syntax": "off",
    "no-return-assign": "off",
    "no-script-url": "off",
    "no-self-assign": "error",
    "no-self-compare": "off",
    "no-sequences": "off",
    "no-shadow": "off",
    "no-shadow-restricted-names": "off",
    "no-whitespace-before-property": "off",
    "no-spaced-func": "off",
    "no-sparse-arrays": "error",
    "no-sync": "off",
    "no-ternary": "off",
    "no-trailing-spaces": "off",
    "no-this-before-super": "error",
    "no-throw-literal": "off",
    "no-undef": "error",
    "no-undef-init": "off",
    "no-undefined": "off",
    "no-unexpected-multiline": "error",
    "no-underscore-dangle": "off",
    "no-unmodified-loop-condition": "off",
    "no-unneeded-ternary": "off",
    "no-unreachable": "error",
    "no-unsafe-finally": "off",
    "no-unused-expressions": "off",
    "no-unused-labels": "error",
    "no-unused-vars": "error",
    "no-use-before-define": "off",
    "no-useless-call": "off",
    "no-useless-computed-key": "off",
    "no-useless-concat": "off",
    "no-useless-constructor": "off",
    "no-useless-escape": "off",
    "no-useless-rename": "off",
    "no-void": "off",
    "no-var": "off",
    "no-warning-comments": "off",
    "no-with": "off",
    "array-bracket-spacing": "off",
    "array-callback-return": "off",
    "arrow-body-style": "off",
    "arrow-parens": "off",
    "arrow-spacing": "off",
    "accessor-pairs": "off",
    "block-scoped-var": "off",
    "block-spacing": "off",
    "brace-style": "off",
    "callback-return": "off",
    "camelcase": "off",
    "comma-dangle": "error",
    "comma-spacing": "off",
    "comma-style": "off",
    "complexity": ["off", 11],
    "computed-property-spacing": "off",
    "consistent-return": "off",
    "consistent-this": "off",
    "constructor-super": "error",
    "curly": "off",
    "default-case": "off",
    "dot-location": "off",
    "dot-notation": "off",
    "eol-last": "off",
    "eqeqeq": "off",
    "func-names": "off",
    "func-style": "off",
    "generator-star-spacing": "off",
    "global-require": "off",
    "guard-for-in": "off",
    "handle-callback-err": "off",
    "id-blacklist": "off",
    "id-length": "off",
    "id-match": "off",
    "indent": "off",
    "init-declarations": "off",
    "jsx-quotes": "off",
    "key-spacing": "off",
    "keyword-spacing": "off",
    "linebreak-style": "off",
    "lines-around-comment": "off",
    "max-depth": "off",
    "max-len": "off",
    "max-lines": "off",
    "max-nested-callbacks": "off",
    "max-params": "off",
    "max-statements": "off",
    "max-statements-per-line": "off",
    "new-cap": "off",
    "new-parens": "off",
    "newline-after-var": "off",
    "newline-before-return": "off",
    "newline-per-chained-call": "off",
    "object-curly-newline": "off",
    "object-curly-spacing": ["off", "never"],
    "object-property-newline": "off",
    "object-shorthand": "off",
    "one-var": "off",
    "one-var-declaration-per-line": "off",
    "operator-assignment": "off",
    "operator-linebreak": "off",
    "padded-blocks": "off",
    "prefer-arrow-callback": "off",
    "prefer-const": "off",
    "prefer-reflect": "off",
    "prefer-rest-params": "off",
    "prefer-spread": "off",
    "prefer-template": "off",
    "quote-props": "off",
    "quotes": "off",
    "radix": "off",
    "require-jsdoc": "off",
    "require-yield": "off",
    "rest-spread-spacing": "off",
    "semi": "off",
    "semi-spacing": "off",
    "sort-imports": "off",
    "sort-vars": "off",
    "space-before-blocks": "off",
    "space-before-function-paren": "off",
    "space-in-parens": "off",
    "space-infix-ops": "off",
    "space-unary-ops": "off",
    "spaced-comment": "off",
    "strict": "off",
    "template-curly-spacing": "off",
    "unicode-bom": "off",
    "use-isnan": "error",
    "valid-jsdoc": "off",
    "valid-typeof": "error",
    "vars-on-top": "off",
    "wrap-iife": "off",
    "wrap-regex": "off",
    "yield-star-spacing": "off",
    "yoda": "off"
}

}

},{}],4:[function(require,module,exports){ module.exports={

"rules": {
    "generator-star": ["generator-star-spacing"],
    "global-strict": ["strict"],
    "no-arrow-condition": ["no-confusing-arrow", "no-constant-condition"],
    "no-comma-dangle": ["comma-dangle"],
    "no-empty-class": ["no-empty-character-class"],
    "no-empty-label": ["no-labels"],
    "no-extra-strict": ["strict"],
    "no-reserved-keys": ["quote-props"],
    "no-space-before-semi": ["semi-spacing"],
    "no-wrap-func": ["no-extra-parens"],
    "space-after-function-name": ["space-before-function-paren"],
    "space-after-keywords": ["keyword-spacing"],
    "space-before-function-parentheses": ["space-before-function-paren"],
    "space-before-keywords": ["keyword-spacing"],
    "space-in-brackets": ["object-curly-spacing", "array-bracket-spacing", "computed-property-spacing"],
    "space-return-throw-case": ["keyword-spacing"],
    "space-unary-word-ops": ["space-unary-ops"],
    "spaced-line-comment": ["spaced-comment"]
}

}

},{}],5:[function(require,module,exports){ // wiki.commonjs.org/wiki/Unit_Testing/1.0 // // THIS IS NOT TESTED NOR LIKELY TO WORK OUTSIDE V8! // // Originally from narwhal.js (narwhaljs.org) // Copyright © 2009 Thomas Robinson <280north.com> // // 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 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.

// when used in node, this will actually load the util module we depend on // versus loading the builtin util module as happens otherwise // this is a bug in node module loading as far as I am concerned var util = require(‘util/’);

var pSlice = Array.prototype.slice; var hasOwn = Object.prototype.hasOwnProperty;

// 1. The assert module provides functions that throw // AssertionError’s when particular conditions are not met. The // assert module must conform to the following interface.

var assert = module.exports = ok;

// 2. The AssertionError is defined in assert. // new assert.AssertionError({ message: message, // actual: actual, // expected: expected })

assert.AssertionError = function AssertionError(options) {

this.name = 'AssertionError';
this.actual = options.actual;
this.expected = options.expected;
this.operator = options.operator;
if (options.message) {
  this.message = options.message;
  this.generatedMessage = false;
} else {
  this.message = getMessage(this);
  this.generatedMessage = true;
}
var stackStartFunction = options.stackStartFunction || fail;

if (Error.captureStackTrace) {
  Error.captureStackTrace(this, stackStartFunction);
}
else {
  // non v8 browsers so we can have a stacktrace
  var err = new Error();
  if (err.stack) {
    var out = err.stack;

    // try to strip useless frames
    var fn_name = stackStartFunction.name;
    var idx = out.indexOf('\n' + fn_name);
    if (idx >= 0) {
      // once we have located the function frame
      // we need to strip out everything before it (and its line)
      var next_line = out.indexOf('\n', idx + 1);
      out = out.substring(next_line + 1);
    }

    this.stack = out;
  }
}

};

// assert.AssertionError instanceof Error util.inherits(assert.AssertionError, Error);

function replacer(key, value) {

if (util.isUndefined(value)) {
  return '' + value;
}
if (util.isNumber(value) && !isFinite(value)) {
  return value.toString();
}
if (util.isFunction(value) || util.isRegExp(value)) {
  return value.toString();
}
return value;

}

function truncate(s, n) {

if (util.isString(s)) {
  return s.length < n ? s : s.slice(0, n);
} else {
  return s;
}

}

function getMessage(self) {

return truncate(JSON.stringify(self.actual, replacer), 128) + ' ' +
       self.operator + ' ' +
       truncate(JSON.stringify(self.expected, replacer), 128);

}

// At present only the three keys mentioned above are used and // understood by the spec. Implementations or sub modules can pass // other keys to the AssertionError’s constructor - they will be // ignored.

// 3. All of the following functions must throw an AssertionError // when a corresponding condition is not met, with a message that // may be undefined if not provided. All assertion methods provide // both the actual and expected values to the assertion error for // display purposes.

function fail(actual, expected, message, operator, stackStartFunction) {

throw new assert.AssertionError({
  message: message,
  actual: actual,
  expected: expected,
  operator: operator,
  stackStartFunction: stackStartFunction
});

}

// EXTENSION! allows for well behaved errors defined elsewhere. assert.fail = fail;

// 4. Pure assertion tests whether a value is truthy, as determined // by !!guard. // assert.ok(guard, message_opt); // This statement is equivalent to assert.equal(true, !!guard, // message_opt);. To test strictly for the value true, use // assert.strictEqual(true, guard, message_opt);.

function ok(value, message) {

if (!value) fail(value, true, message, '==', assert.ok);

} assert.ok = ok;

// 5. The equality assertion tests shallow, coercive equality with // ==. // assert.equal(actual, expected, message_opt);

assert.equal = function equal(actual, expected, message) {

if (actual != expected) fail(actual, expected, message, '==', assert.equal);

};

// 6. The non-equality assertion tests for whether two objects are not equal // with != assert.notEqual(actual, expected, message_opt);

assert.notEqual = function notEqual(actual, expected, message) {

if (actual == expected) {
  fail(actual, expected, message, '!=', assert.notEqual);
}

};

// 7. The equivalence assertion tests a deep equality relation. // assert.deepEqual(actual, expected, message_opt);

assert.deepEqual = function deepEqual(actual, expected, message) {

if (!_deepEqual(actual, expected)) {
  fail(actual, expected, message, 'deepEqual', assert.deepEqual);
}

};

function _deepEqual(actual, expected) {

// 7.1. All identical values are equivalent, as determined by ===.
if (actual === expected) {
  return true;

} else if (util.isBuffer(actual) && util.isBuffer(expected)) {
  if (actual.length != expected.length) return false;

  for (var i = 0; i < actual.length; i++) {
    if (actual[i] !== expected[i]) return false;
  }

  return true;

// 7.2. If the expected value is a Date object, the actual value is
// equivalent if it is also a Date object that refers to the same time.
} else if (util.isDate(actual) && util.isDate(expected)) {
  return actual.getTime() === expected.getTime();

// 7.3 If the expected value is a RegExp object, the actual value is
// equivalent if it is also a RegExp object with the same source and
// properties (`global`, `multiline`, `lastIndex`, `ignoreCase`).
} else if (util.isRegExp(actual) && util.isRegExp(expected)) {
  return actual.source === expected.source &&
         actual.global === expected.global &&
         actual.multiline === expected.multiline &&
         actual.lastIndex === expected.lastIndex &&
         actual.ignoreCase === expected.ignoreCase;

// 7.4. Other pairs that do not both pass typeof value == 'object',
// equivalence is determined by ==.
} else if (!util.isObject(actual) && !util.isObject(expected)) {
  return actual == expected;

// 7.5 For all other Object pairs, including Array objects, equivalence is
// determined by having the same number of owned properties (as verified
// with Object.prototype.hasOwnProperty.call), the same set of keys
// (although not necessarily the same order), equivalent values for every
// corresponding key, and an identical 'prototype' property. Note: this
// accounts for both named and indexed properties on Arrays.
} else {
  return objEquiv(actual, expected);
}

}

function isArguments(object) {

return Object.prototype.toString.call(object) == '[object Arguments]';

}

function objEquiv(a, b) {

if (util.isNullOrUndefined(a) || util.isNullOrUndefined(b))
  return false;
// an identical 'prototype' property.
if (a.prototype !== b.prototype) return false;
// if one is a primitive, the other must be same
if (util.isPrimitive(a) || util.isPrimitive(b)) {
  return a === b;
}
var aIsArgs = isArguments(a),
    bIsArgs = isArguments(b);
if ((aIsArgs && !bIsArgs) || (!aIsArgs && bIsArgs))
  return false;
if (aIsArgs) {
  a = pSlice.call(a);
  b = pSlice.call(b);
  return _deepEqual(a, b);
}
var ka = objectKeys(a),
    kb = objectKeys(b),
    key, i;
// having the same number of owned properties (keys incorporates
// hasOwnProperty)
if (ka.length != kb.length)
  return false;
//the same set of keys (although not necessarily the same order),
ka.sort();
kb.sort();
//~~~cheap key test
for (i = ka.length - 1; i >= 0; i--) {
  if (ka[i] != kb[i])
    return false;
}
//equivalent values for every corresponding key, and
//~~~possibly expensive deep test
for (i = ka.length - 1; i >= 0; i--) {
  key = ka[i];
  if (!_deepEqual(a[key], b[key])) return false;
}
return true;

}

// 8. The non-equivalence assertion tests for any deep inequality. // assert.notDeepEqual(actual, expected, message_opt);

assert.notDeepEqual = function notDeepEqual(actual, expected, message) {

if (_deepEqual(actual, expected)) {
  fail(actual, expected, message, 'notDeepEqual', assert.notDeepEqual);
}

};

// 9. The strict equality assertion tests strict equality, as determined by ===. // assert.strictEqual(actual, expected, message_opt);

assert.strictEqual = function strictEqual(actual, expected, message) {

if (actual !== expected) {
  fail(actual, expected, message, '===', assert.strictEqual);
}

};

// 10. The strict non-equality assertion tests for strict inequality, as // determined by !==. assert.notStrictEqual(actual, expected, message_opt);

assert.notStrictEqual = function notStrictEqual(actual, expected, message) {

if (actual === expected) {
  fail(actual, expected, message, '!==', assert.notStrictEqual);
}

};

function expectedException(actual, expected) {

if (!actual || !expected) {
  return false;
}

if (Object.prototype.toString.call(expected) == '[object RegExp]') {
  return expected.test(actual);
} else if (actual instanceof expected) {
  return true;
} else if (expected.call({}, actual) === true) {
  return true;
}

return false;

}

function _throws(shouldThrow, block, expected, message) {

var actual;

if (util.isString(expected)) {
  message = expected;
  expected = null;
}

try {
  block();
} catch (e) {
  actual = e;
}

message = (expected && expected.name ? ' (' + expected.name + ').' : '.') +
          (message ? ' ' + message : '.');

if (shouldThrow && !actual) {
  fail(actual, expected, 'Missing expected exception' + message);
}

if (!shouldThrow && expectedException(actual, expected)) {
  fail(actual, expected, 'Got unwanted exception' + message);
}

if ((shouldThrow && actual && expected &&
    !expectedException(actual, expected)) || (!shouldThrow && actual)) {
  throw actual;
}

}

// 11. Expected to throw an error: // assert.throws(block, Error_opt, message_opt);

assert.throws = function(block, /optional/error, /optional/message) {

_throws.apply(this, [true].concat(pSlice.call(arguments)));

};

// EXTENSION! This is annoying to write outside this module. assert.doesNotThrow = function(block, /optional/message) {

_throws.apply(this, [false].concat(pSlice.call(arguments)));

};

assert.ifError = function(err) { if (err) {throw err;}};

var objectKeys = Object.keys || function (obj) {

var keys = [];
for (var key in obj) {
  if (hasOwn.call(obj, key)) keys.push(key);
}
return keys;

};

},{“util/”:122}],6:[function(require,module,exports){ ‘use strict’;

var copy = require(‘es5-ext/object/copy’)

, map        = require('es5-ext/object/map')
, callable   = require('es5-ext/object/valid-callable')
, validValue = require('es5-ext/object/valid-value')

, bind = Function.prototype.bind, defineProperty = Object.defineProperty
, hasOwnProperty = Object.prototype.hasOwnProperty
, define;

define = function (name, desc, bindTo) {

var value = validValue(desc) && callable(desc.value), dgs;
dgs = copy(desc);
delete dgs.writable;
delete dgs.value;
dgs.get = function () {
        if (hasOwnProperty.call(this, name)) return value;
        desc.value = bind.call(value, (bindTo == null) ? this : this[bindTo]);
        defineProperty(this, name, desc);
        return this[name];
};
return dgs;

};

module.exports = function (props/*, bindTo*/) {

var bindTo = arguments[1];
return map(props, function (desc, name) {
        return define(name, desc, bindTo);
});

};

},{“es5-ext/object/copy”:30,“es5-ext/object/map”:38,“es5-ext/object/valid-callable”:44,“es5-ext/object/valid-value”:46}],7:[function(require,module,exports){ ‘use strict’;

var assign = require(‘es5-ext/object/assign’)

, normalizeOpts = require('es5-ext/object/normalize-options')
, isCallable    = require('es5-ext/object/is-callable')
, contains      = require('es5-ext/string/#/contains')

, d;

d = module.exports = function (dscr, value/*, options*/) {

var c, e, w, options, desc;
if ((arguments.length < 2) || (typeof dscr !== 'string')) {
        options = value;
        value = dscr;
        dscr = null;
} else {
        options = arguments[2];
}
if (dscr == null) {
        c = w = true;
        e = false;
} else {
        c = contains.call(dscr, 'c');
        e = contains.call(dscr, 'e');
        w = contains.call(dscr, 'w');
}

desc = { value: value, configurable: c, enumerable: e, writable: w };
return !options ? desc : assign(normalizeOpts(options), desc);

};

d.gs = function (dscr, get, set/*, options*/) {

var c, e, options, desc;
if (typeof dscr !== 'string') {
        options = set;
        set = get;
        get = dscr;
        dscr = null;
} else {
        options = arguments[3];
}
if (get == null) {
        get = undefined;
} else if (!isCallable(get)) {
        options = get;
        get = set = undefined;
} else if (set == null) {
        set = undefined;
} else if (!isCallable(set)) {
        options = set;
        set = undefined;
}
if (dscr == null) {
        c = true;
        e = false;
} else {
        c = contains.call(dscr, 'c');
        e = contains.call(dscr, 'e');
}

desc = { get: get, set: set, configurable: c, enumerable: e };
return !options ? desc : assign(normalizeOpts(options), desc);

};

},{“es5-ext/object/assign”:27,“es5-ext/object/is-callable”:33,“es5-ext/object/normalize-options”:39,“es5-ext/string/#/contains”:47}],8:[function(require,module,exports){

/**

* This is the web browser implementation of `debug()`.
*
* Expose `debug()` as the module.
*/

exports = module.exports = require(‘./debug’); exports.log = log; exports.formatArgs = formatArgs; exports.save = save; exports.load = load; exports.useColors = useColors; exports.storage = ‘undefined’ != typeof chrome

&& 'undefined' != typeof chrome.storage
   ? chrome.storage.local
   : localstorage();

/**

* Colors.
*/

exports.colors = [

'lightseagreen',
'forestgreen',
'goldenrod',
'dodgerblue',
'darkorchid',
'crimson'

];

/**

* Currently only WebKit-based Web Inspectors, Firefox >= v31,
* and the Firebug extension (any Firefox version) are known
* to support "%c" CSS customizations.
*
* TODO: add a `localStorage` variable to explicitly enable/disable colors
*/

function useColors() {

// is webkit? http://stackoverflow.com/a/16459606/376773
return ('WebkitAppearance' in document.documentElement.style) ||
  // is firebug? http://stackoverflow.com/a/398120/376773
  (window.console && (console.firebug || (console.exception && console.table))) ||
  // is firefox >= v31?
  // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
  (navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31);

}

/**

* Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
*/

exports.formatters.j = function(v) {

return JSON.stringify(v);

};

/**

* Colorize log arguments if enabled.
*
* @api public
*/

function formatArgs() {

var args = arguments;
var useColors = this.useColors;

args[0] = (useColors ? '%c' : '')
  + this.namespace
  + (useColors ? ' %c' : ' ')
  + args[0]
  + (useColors ? '%c ' : ' ')
  + '+' + exports.humanize(this.diff);

if (!useColors) return args;

var c = 'color: ' + this.color;
args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));

// the final "%c" is somewhat tricky, because there could be other
// arguments passed either before or after the %c, so we need to
// figure out the correct index to insert the CSS into
var index = 0;
var lastC = 0;
args[0].replace(/%[a-z%]/g, function(match) {
  if ('%%' === match) return;
  index++;
  if ('%c' === match) {
    // we only are interested in the *last* %c
    // (the user may have provided their own)
    lastC = index;
  }
});

args.splice(lastC, 0, c);
return args;

}

/**

* Invokes `console.log()` when available.
* No-op when `console.log` is not a "function".
*
* @api public
*/

function log() {

// this hackery is required for IE8/9, where
// the `console.log` function doesn't have 'apply'
return 'object' === typeof console
  && console.log
  && Function.prototype.apply.call(console.log, console, arguments);

}

/**

* Save `namespaces`.
*
* @param {String} namespaces
* @api private
*/

function save(namespaces) {

try {
  if (null == namespaces) {
    exports.storage.removeItem('debug');
  } else {
    exports.storage.debug = namespaces;
  }
} catch(e) {}

}

/**

* Load `namespaces`.
*
* @return {String} returns the previously persisted debug modes
* @api private
*/

function load() {

var r;
try {
  r = exports.storage.debug;
} catch(e) {}
return r;

}

/**

* Enable namespaces listed in `localStorage.debug` initially.
*/

exports.enable(load());

/**

* Localstorage attempts to return the localstorage.
*
* This is necessary because safari throws
* when a user disables cookies/localstorage
* and you attempt to access it.
*
* @return {LocalStorage}
* @api private
*/

function localstorage(){

try {
  return window.localStorage;
} catch (e) {}

}

},{“./debug”:9}],9:[function(require,module,exports){

/**

* This is the common logic for both the Node.js and web browser
* implementations of `debug()`.
*
* Expose `debug()` as the module.
*/

exports = module.exports = debug; exports.coerce = coerce; exports.disable = disable; exports.enable = enable; exports.enabled = enabled; exports.humanize = require(‘ms’);

/**

* The currently active debug mode names, and names to skip.
*/

exports.names = []; exports.skips = [];

/**

* Map of special "%n" handling functions, for the debug "format" argument.
*
* Valid key names are a single, lowercased letter, i.e. "n".
*/

exports.formatters = {};

/**

* Previously assigned color.
*/

var prevColor = 0;

/**

* Previous log timestamp.
*/

var prevTime;

/**

* Select a color.
*
* @return {Number}
* @api private
*/

function selectColor() {

return exports.colors[prevColor++ % exports.colors.length];

}

/**

* Create a debugger with the given `namespace`.
*
* @param {String} namespace
* @return {Function}
* @api public
*/

function debug(namespace) {

// define the `disabled` version
function disabled() {
}
disabled.enabled = false;

// define the `enabled` version
function enabled() {

  var self = enabled;

  // set `diff` timestamp
  var curr = +new Date();
  var ms = curr - (prevTime || curr);
  self.diff = ms;
  self.prev = prevTime;
  self.curr = curr;
  prevTime = curr;

  // add the `color` if not set
  if (null == self.useColors) self.useColors = exports.useColors();
  if (null == self.color && self.useColors) self.color = selectColor();

  var args = Array.prototype.slice.call(arguments);

  args[0] = exports.coerce(args[0]);

  if ('string' !== typeof args[0]) {
    // anything else let's inspect with %o
    args = ['%o'].concat(args);
  }

  // apply any `formatters` transformations
  var index = 0;
  args[0] = args[0].replace(/%([a-z%])/g, function(match, format) {
    // if we encounter an escaped % then don't increase the array index
    if (match === '%%') return match;
    index++;
    var formatter = exports.formatters[format];
    if ('function' === typeof formatter) {
      var val = args[index];
      match = formatter.call(self, val);

      // now we need to remove `args[index]` since it's inlined in the `format`
      args.splice(index, 1);
      index--;
    }
    return match;
  });

  if ('function' === typeof exports.formatArgs) {
    args = exports.formatArgs.apply(self, args);
  }
  var logFn = enabled.log || exports.log || console.log.bind(console);
  logFn.apply(self, args);
}
enabled.enabled = true;

var fn = exports.enabled(namespace) ? enabled : disabled;

fn.namespace = namespace;

return fn;

}

/**

* Enables a debug mode by namespaces. This can include modes
* separated by a colon and wildcards.
*
* @param {String} namespaces
* @api public
*/

function enable(namespaces) {

exports.save(namespaces);

var split = (namespaces || '').split(/[\s,]+/);
var len = split.length;

for (var i = 0; i < len; i++) {
  if (!split[i]) continue; // ignore empty strings
  namespaces = split[i].replace(/\*/g, '.*?');
  if (namespaces[0] === '-') {
    exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
  } else {
    exports.names.push(new RegExp('^' + namespaces + '$'));
  }
}

}

/**

* Disable debug output.
*
* @api public
*/

function disable() {

exports.enable('');

}

/**

* Returns true if the given mode name is enabled, false otherwise.
*
* @param {String} name
* @return {Boolean}
* @api public
*/

function enabled(name) {

var i, len;
for (i = 0, len = exports.skips.length; i < len; i++) {
  if (exports.skips[i].test(name)) {
    return false;
  }
}
for (i = 0, len = exports.names.length; i < len; i++) {
  if (exports.names[i].test(name)) {
    return true;
  }
}
return false;

}

/**

* Coerce `val`.
*
* @param {Mixed} val
* @return {Mixed}
* @api private
*/

function coerce(val) {

if (val instanceof Error) return val.stack || val.message;
return val;

}

},{“ms”:109}],10:[function(require,module,exports){ /*

* @fileoverview Main Doctrine object
* @author Yusuke Suzuki <utatane.tea@gmail.com>
* @author Dan Tao <daniel.tao@gmail.com>
* @author Andrew Eisenberg <andrew@eisenberg.as>
*/

(function () {

'use strict';

var typed,
    utility,
    isArray,
    jsdoc,
    esutils,
    hasOwnProperty;

esutils = require('esutils');
isArray = require('isarray');
typed = require('./typed');
utility = require('./utility');

function sliceSource(source, index, last) {
    return source.slice(index, last);
}

hasOwnProperty = (function () {
    var func = Object.prototype.hasOwnProperty;
    return function hasOwnProperty(obj, name) {
        return func.call(obj, name);
    };
}());

function shallowCopy(obj) {
    var ret = {}, key;
    for (key in obj) {
        if (obj.hasOwnProperty(key)) {
            ret[key] = obj[key];
        }
    }
    return ret;
}

function isASCIIAlphanumeric(ch) {
    return (ch >= 0x61  /* 'a' */ && ch <= 0x7A  /* 'z' */) ||
        (ch >= 0x41  /* 'A' */ && ch <= 0x5A  /* 'Z' */) ||
        (ch >= 0x30  /* '0' */ && ch <= 0x39  /* '9' */);
}

function isParamTitle(title) {
    return title === 'param' || title === 'argument' || title === 'arg';
}

function isReturnTitle(title) {
    return title === 'return' || title === 'returns';
}

function isProperty(title) {
    return title === 'property' || title === 'prop';
}

function isNameParameterRequired(title) {
    return isParamTitle(title) || isProperty(title) ||
        title === 'alias' || title === 'this' || title === 'mixes' || title === 'requires';
}

function isAllowedName(title) {
    return isNameParameterRequired(title) || title === 'const' || title === 'constant';
}

function isAllowedNested(title) {
    return isProperty(title) || isParamTitle(title);
}

function isTypeParameterRequired(title) {
    return isParamTitle(title) || isReturnTitle(title) ||
        title === 'define' || title === 'enum' ||
        title === 'implements' || title === 'this' ||
        title === 'type' || title === 'typedef' || isProperty(title);
}

// Consider deprecation instead using 'isTypeParameterRequired' and 'Rules' declaration to pick when a type is optional/required
// This would require changes to 'parseType'
function isAllowedType(title) {
    return isTypeParameterRequired(title) || title === 'throws' || title === 'const' || title === 'constant' ||
        title === 'namespace' || title === 'member' || title === 'var' || title === 'module' ||
        title === 'constructor' || title === 'class' || title === 'extends' || title === 'augments' ||
        title === 'public' || title === 'private' || title === 'protected';
}

function trim(str) {
    return str.replace(/^\s+/, '').replace(/\s+$/, '');
}

function unwrapComment(doc) {
    // JSDoc comment is following form
    //   /**
    //    * .......
    //    */
    // remove /**, */ and *
    var BEFORE_STAR = 0,
        STAR = 1,
        AFTER_STAR = 2,
        index,
        len,
        mode,
        result,
        ch;

    doc = doc.replace(/^\/\*\*?/, '').replace(/\*\/$/, '');
    index = 0;
    len = doc.length;
    mode = BEFORE_STAR;
    result = '';

    while (index < len) {
        ch = doc.charCodeAt(index);
        switch (mode) {
        case BEFORE_STAR:
            if (esutils.code.isLineTerminator(ch)) {
                result += String.fromCharCode(ch);
            } else if (ch === 0x2A  /* '*' */) {
                mode = STAR;
            } else if (!esutils.code.isWhiteSpace(ch)) {
                result += String.fromCharCode(ch);
                mode = AFTER_STAR;
            }
            break;

        case STAR:
            if (!esutils.code.isWhiteSpace(ch)) {
                result += String.fromCharCode(ch);
            }
            mode = esutils.code.isLineTerminator(ch) ? BEFORE_STAR : AFTER_STAR;
            break;

        case AFTER_STAR:
            result += String.fromCharCode(ch);
            if (esutils.code.isLineTerminator(ch)) {
                mode = BEFORE_STAR;
            }
            break;
        }
        index += 1;
    }

    return result.replace(/\s+$/, '');
}

// JSDoc Tag Parser

(function (exports) {
    var Rules,
        index,
        lineNumber,
        length,
        source,
        recoverable,
        sloppy,
        strict;

    function advance() {
        var ch = source.charCodeAt(index);
        index += 1;
        if (esutils.code.isLineTerminator(ch) && !(ch === 0x0D  /* '\r' */ && source.charCodeAt(index) === 0x0A  /* '\n' */)) {
            lineNumber += 1;
        }
        return String.fromCharCode(ch);
    }

    function scanTitle() {
        var title = '';
        // waste '@'
        advance();

        while (index < length && isASCIIAlphanumeric(source.charCodeAt(index))) {
            title += advance();
        }

        return title;
    }

    function seekContent() {
        var ch, waiting, last = index;

        waiting = false;
        while (last < length) {
            ch = source.charCodeAt(last);
            if (esutils.code.isLineTerminator(ch) && !(ch === 0x0D  /* '\r' */ && source.charCodeAt(last + 1) === 0x0A  /* '\n' */)) {
                waiting = true;
            } else if (waiting) {
                if (ch === 0x40  /* '@' */) {
                    break;
                }
                if (!esutils.code.isWhiteSpace(ch)) {
                    waiting = false;
                }
            }
            last += 1;
        }
        return last;
    }

    // type expression may have nest brace, such as,
    // { { ok: string } }
    //
    // therefore, scanning type expression with balancing braces.
    function parseType(title, last) {
        var ch, brace, type, direct = false;

        // search '{'
        while (index < last) {
            ch = source.charCodeAt(index);
            if (esutils.code.isWhiteSpace(ch)) {
                advance();
            } else if (ch === 0x7B  /* '{' */) {
                advance();
                break;
            } else {
                // this is direct pattern
                direct = true;
                break;
            }
        }

        if (direct) {
            return null;
        }

        // type expression { is found
        brace = 1;
        type = '';
        while (index < last) {
            ch = source.charCodeAt(index);
            if (esutils.code.isLineTerminator(ch)) {
                advance();
            } else {
                if (ch === 0x7D  /* '}' */) {
                    brace -= 1;
                    if (brace === 0) {
                        advance();
                        break;
                    }
                } else if (ch === 0x7B  /* '{' */) {
                    brace += 1;
                }
                type += advance();
            }
        }

        if (brace !== 0) {
            // braces is not balanced
            return utility.throwError('Braces are not balanced');
        }

        if (isParamTitle(title)) {
            return typed.parseParamType(type);
        }
        return typed.parseType(type);
    }

    function scanIdentifier(last) {
        var identifier;
        if (!esutils.code.isIdentifierStart(source.charCodeAt(index))) {
            return null;
        }
        identifier = advance();
        while (index < last && esutils.code.isIdentifierPart(source.charCodeAt(index))) {
            identifier += advance();
        }
        return identifier;
    }

    function skipWhiteSpace(last) {
        while (index < last && (esutils.code.isWhiteSpace(source.charCodeAt(index)) || esutils.code.isLineTerminator(source.charCodeAt(index)))) {
            advance();
        }
    }

    function parseName(last, allowBrackets, allowNestedParams) {
        var name = '',
            useBrackets,
            insideString;

        skipWhiteSpace(last);

        if (index >= last) {
            return null;
        }

        if (allowBrackets && source.charCodeAt(index) === 0x5B  /* '[' */) {
            useBrackets = true;
            name = advance();
        }

        if (!esutils.code.isIdentifierStart(source.charCodeAt(index))) {
            return null;
        }

        name += scanIdentifier(last);

        if (allowNestedParams) {
            if (source.charCodeAt(index) === 0x3A /* ':' */ && (
                    name === 'module' ||
                    name === 'external' ||
                    name === 'event')) {
                name += advance();
                name += scanIdentifier(last);

            }
            if(source.charCodeAt(index) === 0x5B  /* '[' */ && source.charCodeAt(index + 1) === 0x5D  /* ']' */){
                name += advance();
                name += advance();
            }
            while (source.charCodeAt(index) === 0x2E  /* '.' */ ||
                    source.charCodeAt(index) === 0x2F  /* '/' */ ||
                    source.charCodeAt(index) === 0x23  /* '#' */ ||
                    source.charCodeAt(index) === 0x2D  /* '-' */ ||
                    source.charCodeAt(index) === 0x7E  /* '~' */) {
                name += advance();
                name += scanIdentifier(last);
            }
        }

        if (useBrackets) {
            skipWhiteSpace(last);
            // do we have a default value for this?
            if (source.charCodeAt(index) === 0x3D  /* '=' */) {
                // consume the '='' symbol
                name += advance();
                skipWhiteSpace(last);

                var ch;
                var bracketDepth = 1;

                // scan in the default value
                while (index < last) {
                    ch = source.charCodeAt(index);

                    if (esutils.code.isWhiteSpace(ch)) {
                        if (!insideString) {
                            skipWhiteSpace(last);
                            ch = source.charCodeAt(index);
                        }
                    }

                    if (ch === 0x27 /* ''' */) {
                        if (!insideString) {
                            insideString = '\'';
                        } else {
                            if (insideString === '\'') {
                                insideString = '';
                            }
                        }
                    }

                    if (ch === 0x22 /* '"' */) {
                        if (!insideString) {
                            insideString = '"';
                        } else {
                            if (insideString === '"') {
                                insideString = '';
                            }
                        }
                    }

                    if (ch === 0x5B /* '[' */) {
                        bracketDepth++;
                    } else if (ch === 0x5D  /* ']' */ &&
                        --bracketDepth === 0) {
                        break;
                    }

                    name += advance();
                }
            }

            skipWhiteSpace(last);

            if (index >= last || source.charCodeAt(index) !== 0x5D  /* ']' */) {
                // we never found a closing ']'
                return null;
            }

            // collect the last ']'
            name += advance();
        }

        return name;
    }

    function skipToTag() {
        while (index < length && source.charCodeAt(index) !== 0x40  /* '@' */) {
            advance();
        }
        if (index >= length) {
            return false;
        }
        utility.assert(source.charCodeAt(index) === 0x40  /* '@' */);
        return true;
    }

    function TagParser(options, title) {
        this._options = options;
        this._title = title.toLowerCase();
        this._tag = {
            title: title,
            description: null
        };
        if (this._options.lineNumbers) {
            this._tag.lineNumber = lineNumber;
        }
        this._last = 0;
        // space to save special information for title parsers.
        this._extra = { };
    }

    // addError(err, ...)
    TagParser.prototype.addError = function addError(errorText) {
        var args = Array.prototype.slice.call(arguments, 1),
            msg = errorText.replace(
                /%(\d)/g,
                function (whole, index) {
                    utility.assert(index < args.length, 'Message reference must be in range');
                    return args[index];
                }
            );

        if (!this._tag.errors) {
            this._tag.errors = [];
        }
        if (strict) {
            utility.throwError(msg);
        }
        this._tag.errors.push(msg);
        return recoverable;
    };

    TagParser.prototype.parseType = function () {
        // type required titles
        if (isTypeParameterRequired(this._title)) {
            try {
                this._tag.type = parseType(this._title, this._last);
                if (!this._tag.type) {
                    if (!isParamTitle(this._title) && !isReturnTitle(this._title)) {
                        if (!this.addError('Missing or invalid tag type')) {
                            return false;
                        }
                    }
                }
            } catch (error) {
                this._tag.type = null;
                if (!this.addError(error.message)) {
                    return false;
                }
            }
        } else if (isAllowedType(this._title)) {
            // optional types
            try {
                this._tag.type = parseType(this._title, this._last);
            } catch (e) {
                //For optional types, lets drop the thrown error when we hit the end of the file
            }
        }
        return true;
    };

    TagParser.prototype._parseNamePath = function (optional) {
        var name;
        name = parseName(this._last, sloppy && isParamTitle(this._title), true);
        if (!name) {
            if (!optional) {
                if (!this.addError('Missing or invalid tag name')) {
                    return false;
                }
            }
        }
        this._tag.name = name;
        return true;
    };

    TagParser.prototype.parseNamePath = function () {
        return this._parseNamePath(false);
    };

    TagParser.prototype.parseNamePathOptional = function () {
        return this._parseNamePath(true);
    };

    TagParser.prototype.parseName = function () {
        var assign, name;

        // param, property requires name
        if (isAllowedName(this._title)) {
            this._tag.name = parseName(this._last, sloppy && isParamTitle(this._title), isAllowedNested(this._title));
            if (!this._tag.name) {
                if (!isNameParameterRequired(this._title)) {
                    return true;
                }

                // it's possible the name has already been parsed but interpreted as a type
                // it's also possible this is a sloppy declaration, in which case it will be
                // fixed at the end
                if (isParamTitle(this._title) && this._tag.type && this._tag.type.name) {
                    this._extra.name = this._tag.type;
                    this._tag.name = this._tag.type.name;
                    this._tag.type = null;
                } else {
                    if (!this.addError('Missing or invalid tag name')) {
                        return false;
                    }
                }
            } else {
                name = this._tag.name;
                if (name.charAt(0) === '[' && name.charAt(name.length - 1) === ']') {
                    // extract the default value if there is one
                    // example: @param {string} [somebody=John Doe] description
                    assign = name.substring(1, name.length - 1).split('=');
                    if (assign[1]) {
                        this._tag['default'] = assign[1];
                    }
                    this._tag.name = assign[0];

                    // convert to an optional type
                    if (this._tag.type && this._tag.type.type !== 'OptionalType') {
                        this._tag.type = {
                            type: 'OptionalType',
                            expression: this._tag.type
                        };
                    }
                }
            }
        }

        return true;
    };

    TagParser.prototype.parseDescription = function parseDescription() {
        var description = trim(sliceSource(source, index, this._last));
        if (description) {
            if ((/^-\s+/).test(description)) {
                description = description.substring(2);
            }
            this._tag.description = description;
        }
        return true;
    };

    TagParser.prototype.parseCaption = function parseDescription() {
        var description = trim(sliceSource(source, index, this._last));
        var captionStartTag = '<caption>';
        var captionEndTag = '</caption>';
        var captionStart = description.indexOf(captionStartTag);
        var captionEnd = description.indexOf(captionEndTag);
        if (captionStart >= 0 && captionEnd >= 0) {
            this._tag.caption = trim(description.substring(
                captionStart + captionStartTag.length, captionEnd));
            this._tag.description = trim(description.substring(captionEnd + captionEndTag.length));
        } else {
            this._tag.description = description;
        }
        return true;
    };

    TagParser.prototype.parseKind = function parseKind() {
        var kind, kinds;
        kinds = {
            'class': true,
            'constant': true,
            'event': true,
            'external': true,
            'file': true,
            'function': true,
            'member': true,
            'mixin': true,
            'module': true,
            'namespace': true,
            'typedef': true
        };
        kind = trim(sliceSource(source, index, this._last));
        this._tag.kind = kind;
        if (!hasOwnProperty(kinds, kind)) {
            if (!this.addError('Invalid kind name \'%0\'', kind)) {
                return false;
            }
        }
        return true;
    };

    TagParser.prototype.parseAccess = function parseAccess() {
        var access;
        access = trim(sliceSource(source, index, this._last));
        this._tag.access = access;
        if (access !== 'private' && access !== 'protected' && access !== 'public') {
            if (!this.addError('Invalid access name \'%0\'', access)) {
                return false;
            }
        }
        return true;
    };

    TagParser.prototype.parseThis = function parseAccess() {
        // this name may be a name expression (e.g. {foo.bar})
        // or a name path (e.g. foo.bar)
        var value = trim(sliceSource(source, index, this._last));
        if (value && value.charAt(0) === '{') {
            var gotType = this.parseType();
            if (gotType && this._tag.type.type === 'NameExpression') {
                this._tag.name = this._tag.type.name;
                return true;
            } else {
                return this.addError('Invalid name for this');
            }
        } else {
            return this.parseNamePath();
        }
    };

    TagParser.prototype.parseVariation = function parseVariation() {
        var variation, text;
        text = trim(sliceSource(source, index, this._last));
        variation = parseFloat(text, 10);
        this._tag.variation = variation;
        if (isNaN(variation)) {
            if (!this.addError('Invalid variation \'%0\'', text)) {
                return false;
            }
        }
        return true;
    };

    TagParser.prototype.ensureEnd = function () {
        var shouldBeEmpty = trim(sliceSource(source, index, this._last));
        if (shouldBeEmpty) {
            if (!this.addError('Unknown content \'%0\'', shouldBeEmpty)) {
                return false;
            }
        }
        return true;
    };

    TagParser.prototype.epilogue = function epilogue() {
        var description;

        description = this._tag.description;
        // un-fix potentially sloppy declaration
        if (isParamTitle(this._title) && !this._tag.type && description && description.charAt(0) === '[') {
            this._tag.type = this._extra.name;
            if (!this._tag.name) {
                this._tag.name = undefined;
            }

            if (!sloppy) {
                if (!this.addError('Missing or invalid tag name')) {
                    return false;
                }
            }
        }

        return true;
    };

    Rules = {
        // http://usejsdoc.org/tags-access.html
        'access': ['parseAccess'],
        // http://usejsdoc.org/tags-alias.html
        'alias': ['parseNamePath', 'ensureEnd'],
        // http://usejsdoc.org/tags-augments.html
        'augments': ['parseType', 'parseNamePathOptional', 'ensureEnd'],
        // http://usejsdoc.org/tags-constructor.html
        'constructor': ['parseType', 'parseNamePathOptional', 'ensureEnd'],
        // Synonym: http://usejsdoc.org/tags-constructor.html
        'class': ['parseType', 'parseNamePathOptional', 'ensureEnd'],
        // Synonym: http://usejsdoc.org/tags-extends.html
        'extends': ['parseType', 'parseNamePathOptional', 'ensureEnd'],
        // http://usejsdoc.org/tags-example.html
        'example': ['parseCaption'],
        // http://usejsdoc.org/tags-deprecated.html
        'deprecated': ['parseDescription'],
        // http://usejsdoc.org/tags-global.html
        'global': ['ensureEnd'],
        // http://usejsdoc.org/tags-inner.html
        'inner': ['ensureEnd'],
        // http://usejsdoc.org/tags-instance.html
        'instance': ['ensureEnd'],
        // http://usejsdoc.org/tags-kind.html
        'kind': ['parseKind'],
        // http://usejsdoc.org/tags-mixes.html
        'mixes': ['parseNamePath', 'ensureEnd'],
        // http://usejsdoc.org/tags-mixin.html
        'mixin': ['parseNamePathOptional', 'ensureEnd'],
        // http://usejsdoc.org/tags-member.html
        'member': ['parseType', 'parseNamePathOptional', 'ensureEnd'],
        // http://usejsdoc.org/tags-method.html
        'method': ['parseNamePathOptional', 'ensureEnd'],
        // http://usejsdoc.org/tags-module.html
        'module': ['parseType', 'parseNamePathOptional', 'ensureEnd'],
        // Synonym: http://usejsdoc.org/tags-method.html
        'func': ['parseNamePathOptional', 'ensureEnd'],
        // Synonym: http://usejsdoc.org/tags-method.html
        'function': ['parseNamePathOptional', 'ensureEnd'],
        // Synonym: http://usejsdoc.org/tags-member.html
        'var': ['parseType', 'parseNamePathOptional', 'ensureEnd'],
        // http://usejsdoc.org/tags-name.html
        'name': ['parseNamePath', 'ensureEnd'],
        // http://usejsdoc.org/tags-namespace.html
        'namespace': ['parseType', 'parseNamePathOptional', 'ensureEnd'],
        // http://usejsdoc.org/tags-private.html
        'private': ['parseType', 'parseDescription'],
        // http://usejsdoc.org/tags-protected.html
        'protected': ['parseType', 'parseDescription'],
        // http://usejsdoc.org/tags-public.html
        'public': ['parseType', 'parseDescription'],
        // http://usejsdoc.org/tags-readonly.html
        'readonly': ['ensureEnd'],
        // http://usejsdoc.org/tags-requires.html
        'requires': ['parseNamePath', 'ensureEnd'],
        // http://usejsdoc.org/tags-since.html
        'since': ['parseDescription'],
        // http://usejsdoc.org/tags-static.html
        'static': ['ensureEnd'],
        // http://usejsdoc.org/tags-summary.html
        'summary': ['parseDescription'],
        // http://usejsdoc.org/tags-this.html
        'this': ['parseThis', 'ensureEnd'],
        // http://usejsdoc.org/tags-todo.html
        'todo': ['parseDescription'],
        // http://usejsdoc.org/tags-typedef.html
        'typedef': ['parseType', 'parseNamePathOptional'],
        // http://usejsdoc.org/tags-variation.html
        'variation': ['parseVariation'],
        // http://usejsdoc.org/tags-version.html
        'version': ['parseDescription']
    };

    TagParser.prototype.parse = function parse() {
        var i, iz, sequences, method;

        // empty title
        if (!this._title) {
            if (!this.addError('Missing or invalid title')) {
                return null;
            }
        }

        // Seek to content last index.
        this._last = seekContent(this._title);

        if (hasOwnProperty(Rules, this._title)) {
            sequences = Rules[this._title];
        } else {
            // default sequences
            sequences = ['parseType', 'parseName', 'parseDescription', 'epilogue'];
        }

        for (i = 0, iz = sequences.length; i < iz; ++i) {
            method = sequences[i];
            if (!this[method]()) {
                return null;
            }
        }

        return this._tag;
    };

    function parseTag(options) {
        var title, parser, tag;

        // skip to tag
        if (!skipToTag()) {
            return null;
        }

        // scan title
        title = scanTitle();

        // construct tag parser
        parser = new TagParser(options, title);
        tag = parser.parse();

        // Seek global index to end of this tag.
        while (index < parser._last) {
            advance();
        }
        return tag;
    }

    //
    // Parse JSDoc
    //

    function scanJSDocDescription(preserveWhitespace) {
        var description = '', ch, atAllowed;

        atAllowed = true;
        while (index < length) {
            ch = source.charCodeAt(index);

            if (atAllowed && ch === 0x40  /* '@' */) {
                break;
            }

            if (esutils.code.isLineTerminator(ch)) {
                atAllowed = true;
            } else if (atAllowed && !esutils.code.isWhiteSpace(ch)) {
                atAllowed = false;
            }

            description += advance();
        }

        return preserveWhitespace ? description : trim(description);
    }

    function parse(comment, options) {
        var tags = [], tag, description, interestingTags, i, iz;

        if (options === undefined) {
            options = {};
        }

        if (typeof options.unwrap === 'boolean' && options.unwrap) {
            source = unwrapComment(comment);
        } else {
            source = comment;
        }

        // array of relevant tags
        if (options.tags) {
            if (isArray(options.tags)) {
                interestingTags = { };
                for (i = 0, iz = options.tags.length; i < iz; i++) {
                    if (typeof options.tags[i] === 'string') {
                        interestingTags[options.tags[i]] = true;
                    } else {
                        utility.throwError('Invalid "tags" parameter: ' + options.tags);
                    }
                }
            } else {
                utility.throwError('Invalid "tags" parameter: ' + options.tags);
            }
        }

        length = source.length;
        index = 0;
        lineNumber = 0;
        recoverable = options.recoverable;
        sloppy = options.sloppy;
        strict = options.strict;

        description = scanJSDocDescription(options.preserveWhitespace);

        while (true) {
            tag = parseTag(options);
            if (!tag) {
                break;
            }
            if (!interestingTags || interestingTags.hasOwnProperty(tag.title)) {
                tags.push(tag);
            }
        }

        return {
            description: description,
            tags: tags
        };
    }
    exports.parse = parse;
}(jsdoc = {}));

exports.version = utility.VERSION;
exports.parse = jsdoc.parse;
exports.parseType = typed.parseType;
exports.parseParamType = typed.parseParamType;
exports.unwrapComment = unwrapComment;
exports.Syntax = shallowCopy(typed.Syntax);
exports.Error = utility.DoctrineError;
exports.type = {
    Syntax: exports.Syntax,
    parseType: typed.parseType,
    parseParamType: typed.parseParamType,
    stringify: typed.stringify
};

}()); /* vim: set sw=4 ts=4 et tw=80 : */

},{“./typed”:11,“./utility”:12,“esutils”:16,“isarray”:103}],11:[function(require,module,exports){ /*

* @fileoverview Type expression parser.
* @author Yusuke Suzuki <utatane.tea@gmail.com>
* @author Dan Tao <daniel.tao@gmail.com>
* @author Andrew Eisenberg <andrew@eisenberg.as>
*/

// “typed”, the Type Expression Parser for doctrine.

(function () {

'use strict';

var Syntax,
    Token,
    source,
    length,
    index,
    previous,
    token,
    value,
    esutils,
    utility;

esutils = require('esutils');
utility = require('./utility');

Syntax = {
    NullableLiteral: 'NullableLiteral',
    AllLiteral: 'AllLiteral',
    NullLiteral: 'NullLiteral',
    UndefinedLiteral: 'UndefinedLiteral',
    VoidLiteral: 'VoidLiteral',
    UnionType: 'UnionType',
    ArrayType: 'ArrayType',
    RecordType: 'RecordType',
    FieldType: 'FieldType',
    FunctionType: 'FunctionType',
    ParameterType: 'ParameterType',
    RestType: 'RestType',
    NonNullableType: 'NonNullableType',
    OptionalType: 'OptionalType',
    NullableType: 'NullableType',
    NameExpression: 'NameExpression',
    TypeApplication: 'TypeApplication'
};

Token = {
    ILLEGAL: 0,    // ILLEGAL
    DOT_LT: 1,     // .<
    REST: 2,       // ...
    LT: 3,         // <
    GT: 4,         // >
    LPAREN: 5,     // (
    RPAREN: 6,     // )
    LBRACE: 7,     // {
    RBRACE: 8,     // }
    LBRACK: 9,    // [
    RBRACK: 10,    // ]
    COMMA: 11,     // ,
    COLON: 12,     // :
    STAR: 13,      // *
    PIPE: 14,      // |
    QUESTION: 15,  // ?
    BANG: 16,      // !
    EQUAL: 17,     // =
    NAME: 18,      // name token
    STRING: 19,    // string
    NUMBER: 20,    // number
    EOF: 21
};

function isTypeName(ch) {
    return '><(){}[],:*|?!='.indexOf(String.fromCharCode(ch)) === -1 && !esutils.code.isWhiteSpace(ch) && !esutils.code.isLineTerminator(ch);
}

function Context(previous, index, token, value) {
    this._previous = previous;
    this._index = index;
    this._token = token;
    this._value = value;
}

Context.prototype.restore = function () {
    previous = this._previous;
    index = this._index;
    token = this._token;
    value = this._value;
};

Context.save = function () {
    return new Context(previous, index, token, value);
};

function advance() {
    var ch = source.charAt(index);
    index += 1;
    return ch;
}

function scanHexEscape(prefix) {
    var i, len, ch, code = 0;

    len = (prefix === 'u') ? 4 : 2;
    for (i = 0; i < len; ++i) {
        if (index < length && esutils.code.isHexDigit(source.charCodeAt(index))) {
            ch = advance();
            code = code * 16 + '0123456789abcdef'.indexOf(ch.toLowerCase());
        } else {
            return '';
        }
    }
    return String.fromCharCode(code);
}

function scanString() {
    var str = '', quote, ch, code, unescaped, restore; //TODO review removal octal = false
    quote = source.charAt(index);
    ++index;

    while (index < length) {
        ch = advance();

        if (ch === quote) {
            quote = '';
            break;
        } else if (ch === '\\') {
            ch = advance();
            if (!esutils.code.isLineTerminator(ch.charCodeAt(0))) {
                switch (ch) {
                case 'n':
                    str += '\n';
                    break;
                case 'r':
                    str += '\r';
                    break;
                case 't':
                    str += '\t';
                    break;
                case 'u':
                case 'x':
                    restore = index;
                    unescaped = scanHexEscape(ch);
                    if (unescaped) {
                        str += unescaped;
                    } else {
                        index = restore;
                        str += ch;
                    }
                    break;
                case 'b':
                    str += '\b';
                    break;
                case 'f':
                    str += '\f';
                    break;
                case 'v':
                    str += '\v';
                    break;

                default:
                    if (esutils.code.isOctalDigit(ch.charCodeAt(0))) {
                        code = '01234567'.indexOf(ch);

                        // \0 is not octal escape sequence
                        // Deprecating unused code. TODO review removal
                        //if (code !== 0) {
                        //    octal = true;
                        //}

                        if (index < length && esutils.code.isOctalDigit(source.charCodeAt(index))) {
                            //TODO Review Removal octal = true;
                            code = code * 8 + '01234567'.indexOf(advance());

                            // 3 digits are only allowed when string starts
                            // with 0, 1, 2, 3
                            if ('0123'.indexOf(ch) >= 0 &&
                                    index < length &&
                                    esutils.code.isOctalDigit(source.charCodeAt(index))) {
                                code = code * 8 + '01234567'.indexOf(advance());
                            }
                        }
                        str += String.fromCharCode(code);
                    } else {
                        str += ch;
                    }
                    break;
                }
            } else {
                if (ch ===  '\r' && source.charCodeAt(index) === 0x0A  /* '\n' */) {
                    ++index;
                }
            }
        } else if (esutils.code.isLineTerminator(ch.charCodeAt(0))) {
            break;
        } else {
            str += ch;
        }
    }

    if (quote !== '') {
        utility.throwError('unexpected quote');
    }

    value = str;
    return Token.STRING;
}

function scanNumber() {
    var number, ch;

    number = '';
    ch = source.charCodeAt(index);

    if (ch !== 0x2E  /* '.' */) {
        number = advance();
        ch = source.charCodeAt(index);

        if (number === '0') {
            if (ch === 0x78  /* 'x' */ || ch === 0x58  /* 'X' */) {
                number += advance();
                while (index < length) {
                    ch = source.charCodeAt(index);
                    if (!esutils.code.isHexDigit(ch)) {
                        break;
                    }
                    number += advance();
                }

                if (number.length <= 2) {
                    // only 0x
                    utility.throwError('unexpected token');
                }

                if (index < length) {
                    ch = source.charCodeAt(index);
                    if (esutils.code.isIdentifierStart(ch)) {
                        utility.throwError('unexpected token');
                    }
                }
                value = parseInt(number, 16);
                return Token.NUMBER;
            }

            if (esutils.code.isOctalDigit(ch)) {
                number += advance();
                while (index < length) {
                    ch = source.charCodeAt(index);
                    if (!esutils.code.isOctalDigit(ch)) {
                        break;
                    }
                    number += advance();
                }

                if (index < length) {
                    ch = source.charCodeAt(index);
                    if (esutils.code.isIdentifierStart(ch) || esutils.code.isDecimalDigit(ch)) {
                        utility.throwError('unexpected token');
                    }
                }
                value = parseInt(number, 8);
                return Token.NUMBER;
            }

            if (esutils.code.isDecimalDigit(ch)) {
                utility.throwError('unexpected token');
            }
        }

        while (index < length) {
            ch = source.charCodeAt(index);
            if (!esutils.code.isDecimalDigit(ch)) {
                break;
            }
            number += advance();
        }
    }

    if (ch === 0x2E  /* '.' */) {
        number += advance();
        while (index < length) {
            ch = source.charCodeAt(index);
            if (!esutils.code.isDecimalDigit(ch)) {
                break;
            }
            number += advance();
        }
    }

    if (ch === 0x65  /* 'e' */ || ch === 0x45  /* 'E' */) {
        number += advance();

        ch = source.charCodeAt(index);
        if (ch === 0x2B  /* '+' */ || ch === 0x2D  /* '-' */) {
            number += advance();
        }

        ch = source.charCodeAt(index);
        if (esutils.code.isDecimalDigit(ch)) {
            number += advance();
            while (index < length) {
                ch = source.charCodeAt(index);
                if (!esutils.code.isDecimalDigit(ch)) {
                    break;
                }
                number += advance();
            }
        } else {
            utility.throwError('unexpected token');
        }
    }

    if (index < length) {
        ch = source.charCodeAt(index);
        if (esutils.code.isIdentifierStart(ch)) {
            utility.throwError('unexpected token');
        }
    }

    value = parseFloat(number);
    return Token.NUMBER;
}

function scanTypeName() {
    var ch, ch2;

    value = advance();
    while (index < length && isTypeName(source.charCodeAt(index))) {
        ch = source.charCodeAt(index);
        if (ch === 0x2E  /* '.' */) {
            if ((index + 1) >= length) {
                return Token.ILLEGAL;
            }
            ch2 = source.charCodeAt(index + 1);
            if (ch2 === 0x3C  /* '<' */) {
                break;
            }
        }
        value += advance();
    }
    return Token.NAME;
}

function next() {
    var ch;

    previous = index;

    while (index < length && esutils.code.isWhiteSpace(source.charCodeAt(index))) {
        advance();
    }
    if (index >= length) {
        token = Token.EOF;
        return token;
    }

    ch = source.charCodeAt(index);
    switch (ch) {
    case 0x27:  /* ''' */
    case 0x22:  /* '"' */
        token = scanString();
        return token;

    case 0x3A:  /* ':' */
        advance();
        token = Token.COLON;
        return token;

    case 0x2C:  /* ',' */
        advance();
        token = Token.COMMA;
        return token;

    case 0x28:  /* '(' */
        advance();
        token = Token.LPAREN;
        return token;

    case 0x29:  /* ')' */
        advance();
        token = Token.RPAREN;
        return token;

    case 0x5B:  /* '[' */
        advance();
        token = Token.LBRACK;
        return token;

    case 0x5D:  /* ']' */
        advance();
        token = Token.RBRACK;
        return token;

    case 0x7B:  /* '{' */
        advance();
        token = Token.LBRACE;
        return token;

    case 0x7D:  /* '}' */
        advance();
        token = Token.RBRACE;
        return token;

    case 0x2E:  /* '.' */
        if (index + 1 < length) {
            ch = source.charCodeAt(index + 1);
            if (ch === 0x3C  /* '<' */) {
                advance();  // '.'
                advance();  // '<'
                token = Token.DOT_LT;
                return token;
            }

            if (ch === 0x2E  /* '.' */ && index + 2 < length && source.charCodeAt(index + 2) === 0x2E  /* '.' */) {
                advance();  // '.'
                advance();  // '.'
                advance();  // '.'
                token = Token.REST;
                return token;
            }

            if (esutils.code.isDecimalDigit(ch)) {
                token = scanNumber();
                return token;
            }
        }
        token = Token.ILLEGAL;
        return token;

    case 0x3C:  /* '<' */
        advance();
        token = Token.LT;
        return token;

    case 0x3E:  /* '>' */
        advance();
        token = Token.GT;
        return token;

    case 0x2A:  /* '*' */
        advance();
        token = Token.STAR;
        return token;

    case 0x7C:  /* '|' */
        advance();
        token = Token.PIPE;
        return token;

    case 0x3F:  /* '?' */
        advance();
        token = Token.QUESTION;
        return token;

    case 0x21:  /* '!' */
        advance();
        token = Token.BANG;
        return token;

    case 0x3D:  /* '=' */
        advance();
        token = Token.EQUAL;
        return token;

    default:
        if (esutils.code.isDecimalDigit(ch)) {
            token = scanNumber();
            return token;
        }

        // type string permits following case,
        //
        // namespace.module.MyClass
        //
        // this reduced 1 token TK_NAME
        utility.assert(isTypeName(ch));
        token = scanTypeName();
        return token;
    }
}

function consume(target, text) {
    utility.assert(token === target, text || 'consumed token not matched');
    next();
}

function expect(target, message) {
    if (token !== target) {
        utility.throwError(message || 'unexpected token');
    }
    next();
}

// UnionType := '(' TypeUnionList ')'
//
// TypeUnionList :=
//     <<empty>>
//   | NonemptyTypeUnionList
//
// NonemptyTypeUnionList :=
//     TypeExpression
//   | TypeExpression '|' NonemptyTypeUnionList
function parseUnionType() {
    var elements;
    consume(Token.LPAREN, 'UnionType should start with (');
    elements = [];
    if (token !== Token.RPAREN) {
        while (true) {
            elements.push(parseTypeExpression());
            if (token === Token.RPAREN) {
                break;
            }
            expect(Token.PIPE);
        }
    }
    consume(Token.RPAREN, 'UnionType should end with )');
    return {
        type: Syntax.UnionType,
        elements: elements
    };
}

// ArrayType := '[' ElementTypeList ']'
//
// ElementTypeList :=
//     <<empty>>
//  | TypeExpression
//  | '...' TypeExpression
//  | TypeExpression ',' ElementTypeList
function parseArrayType() {
    var elements;
    consume(Token.LBRACK, 'ArrayType should start with [');
    elements = [];
    while (token !== Token.RBRACK) {
        if (token === Token.REST) {
            consume(Token.REST);
            elements.push({
                type: Syntax.RestType,
                expression: parseTypeExpression()
            });
            break;
        } else {
            elements.push(parseTypeExpression());
        }
        if (token !== Token.RBRACK) {
            expect(Token.COMMA);
        }
    }
    expect(Token.RBRACK);
    return {
        type: Syntax.ArrayType,
        elements: elements
    };
}

function parseFieldName() {
    var v = value;
    if (token === Token.NAME || token === Token.STRING) {
        next();
        return v;
    }

    if (token === Token.NUMBER) {
        consume(Token.NUMBER);
        return String(v);
    }

    utility.throwError('unexpected token');
}

// FieldType :=
//     FieldName
//   | FieldName ':' TypeExpression
//
// FieldName :=
//     NameExpression
//   | StringLiteral
//   | NumberLiteral
//   | ReservedIdentifier
function parseFieldType() {
    var key;

    key = parseFieldName();
    if (token === Token.COLON) {
        consume(Token.COLON);
        return {
            type: Syntax.FieldType,
            key: key,
            value: parseTypeExpression()
        };
    }
    return {
        type: Syntax.FieldType,
        key: key,
        value: null
    };
}

// RecordType := '{' FieldTypeList '}'
//
// FieldTypeList :=
//     <<empty>>
//   | FieldType
//   | FieldType ',' FieldTypeList
function parseRecordType() {
    var fields;

    consume(Token.LBRACE, 'RecordType should start with {');
    fields = [];
    if (token === Token.COMMA) {
        consume(Token.COMMA);
    } else {
        while (token !== Token.RBRACE) {
            fields.push(parseFieldType());
            if (token !== Token.RBRACE) {
                expect(Token.COMMA);
            }
        }
    }
    expect(Token.RBRACE);
    return {
        type: Syntax.RecordType,
        fields: fields
    };
}

// NameExpression :=
//    Identifier
//  | TagIdentifier ':' Identifier
//
// Tag identifier is one of "module", "external" or "event"
// Identifier is the same as Token.NAME, including any dots, something like
// namespace.module.MyClass
function parseNameExpression() {
    var name = value;
    expect(Token.NAME);

    if (token === Token.COLON && (
            name === 'module' ||
            name === 'external' ||
            name === 'event')) {
        consume(Token.COLON);
        name += ':' + value;
        expect(Token.NAME);
    }

    return {
        type: Syntax.NameExpression,
        name: name
    };
}

// TypeExpressionList :=
//     TopLevelTypeExpression
//   | TopLevelTypeExpression ',' TypeExpressionList
function parseTypeExpressionList() {
    var elements = [];

    elements.push(parseTop());
    while (token === Token.COMMA) {
        consume(Token.COMMA);
        elements.push(parseTop());
    }
    return elements;
}

// TypeName :=
//     NameExpression
//   | NameExpression TypeApplication
//
// TypeApplication :=
//     '.<' TypeExpressionList '>'
//   | '<' TypeExpressionList '>'   // this is extension of doctrine
function parseTypeName() {
    var expr, applications;

    expr = parseNameExpression();
    if (token === Token.DOT_LT || token === Token.LT) {
        next();
        applications = parseTypeExpressionList();
        expect(Token.GT);
        return {
            type: Syntax.TypeApplication,
            expression: expr,
            applications: applications
        };
    }
    return expr;
}

// ResultType :=
//     <<empty>>
//   | ':' void
//   | ':' TypeExpression
//
// BNF is above
// but, we remove <<empty>> pattern, so token is always TypeToken::COLON
function parseResultType() {
    consume(Token.COLON, 'ResultType should start with :');
    if (token === Token.NAME && value === 'void') {
        consume(Token.NAME);
        return {
            type: Syntax.VoidLiteral
        };
    }
    return parseTypeExpression();
}

// ParametersType :=
//     RestParameterType
//   | NonRestParametersType
//   | NonRestParametersType ',' RestParameterType
//
// RestParameterType :=
//     '...'
//     '...' Identifier
//
// NonRestParametersType :=
//     ParameterType ',' NonRestParametersType
//   | ParameterType
//   | OptionalParametersType
//
// OptionalParametersType :=
//     OptionalParameterType
//   | OptionalParameterType, OptionalParametersType
//
// OptionalParameterType := ParameterType=
//
// ParameterType := TypeExpression | Identifier ':' TypeExpression
//
// Identifier is "new" or "this"
function parseParametersType() {
    var params = [], optionalSequence = false, expr, rest = false;

    while (token !== Token.RPAREN) {
        if (token === Token.REST) {
            // RestParameterType
            consume(Token.REST);
            rest = true;
        }

        expr = parseTypeExpression();
        if (expr.type === Syntax.NameExpression && token === Token.COLON) {
            // Identifier ':' TypeExpression
            consume(Token.COLON);
            expr = {
                type: Syntax.ParameterType,
                name: expr.name,
                expression: parseTypeExpression()
            };
        }
        if (token === Token.EQUAL) {
            consume(Token.EQUAL);
            expr = {
                type: Syntax.OptionalType,
                expression: expr
            };
            optionalSequence = true;
        } else {
            if (optionalSequence) {
                utility.throwError('unexpected token');
            }
        }
        if (rest) {
            expr = {
                type: Syntax.RestType,
                expression: expr
            };
        }
        params.push(expr);
        if (token !== Token.RPAREN) {
            expect(Token.COMMA);
        }
    }
    return params;
}

// FunctionType := 'function' FunctionSignatureType
//
// FunctionSignatureType :=
//   | TypeParameters '(' ')' ResultType
//   | TypeParameters '(' ParametersType ')' ResultType
//   | TypeParameters '(' 'this' ':' TypeName ')' ResultType
//   | TypeParameters '(' 'this' ':' TypeName ',' ParametersType ')' ResultType
function parseFunctionType() {
    var isNew, thisBinding, params, result, fnType;
    utility.assert(token === Token.NAME && value === 'function', 'FunctionType should start with \'function\'');
    consume(Token.NAME);

    // Google Closure Compiler is not implementing TypeParameters.
    // So we do not. if we don't get '(', we see it as error.
    expect(Token.LPAREN);

    isNew = false;
    params = [];
    thisBinding = null;
    if (token !== Token.RPAREN) {
        // ParametersType or 'this'
        if (token === Token.NAME &&
                (value === 'this' || value === 'new')) {
            // 'this' or 'new'
            // 'new' is Closure Compiler extension
            isNew = value === 'new';
            consume(Token.NAME);
            expect(Token.COLON);
            thisBinding = parseTypeName();
            if (token === Token.COMMA) {
                consume(Token.COMMA);
                params = parseParametersType();
            }
        } else {
            params = parseParametersType();
        }
    }

    expect(Token.RPAREN);

    result = null;
    if (token === Token.COLON) {
        result = parseResultType();
    }

    fnType = {
        type: Syntax.FunctionType,
        params: params,
        result: result
    };
    if (thisBinding) {
        // avoid adding null 'new' and 'this' properties
        fnType['this'] = thisBinding;
        if (isNew) {
            fnType['new'] = true;
        }
    }
    return fnType;
}

// BasicTypeExpression :=
//     '*'
//   | 'null'
//   | 'undefined'
//   | TypeName
//   | FunctionType
//   | UnionType
//   | RecordType
//   | ArrayType
function parseBasicTypeExpression() {
    var context;
    switch (token) {
    case Token.STAR:
        consume(Token.STAR);
        return {
            type: Syntax.AllLiteral
        };

    case Token.LPAREN:
        return parseUnionType();

    case Token.LBRACK:
        return parseArrayType();

    case Token.LBRACE:
        return parseRecordType();

    case Token.NAME:
        if (value === 'null') {
            consume(Token.NAME);
            return {
                type: Syntax.NullLiteral
            };
        }

        if (value === 'undefined') {
            consume(Token.NAME);
            return {
                type: Syntax.UndefinedLiteral
            };
        }

        context = Context.save();
        if (value === 'function') {
            try {
                return parseFunctionType();
            } catch (e) {
                context.restore();
            }
        }

        return parseTypeName();

    default:
        utility.throwError('unexpected token');
    }
}

// TypeExpression :=
//     BasicTypeExpression
//   | '?' BasicTypeExpression
//   | '!' BasicTypeExpression
//   | BasicTypeExpression '?'
//   | BasicTypeExpression '!'
//   | '?'
//   | BasicTypeExpression '[]'
function parseTypeExpression() {
    var expr;

    if (token === Token.QUESTION) {
        consume(Token.QUESTION);
        if (token === Token.COMMA || token === Token.EQUAL || token === Token.RBRACE ||
                token === Token.RPAREN || token === Token.PIPE || token === Token.EOF ||
                token === Token.RBRACK || token === Token.GT) {
            return {
                type: Syntax.NullableLiteral
            };
        }
        return {
            type: Syntax.NullableType,
            expression: parseBasicTypeExpression(),
            prefix: true
        };
    }

    if (token === Token.BANG) {
        consume(Token.BANG);
        return {
            type: Syntax.NonNullableType,
            expression: parseBasicTypeExpression(),
            prefix: true
        };
    }

    expr = parseBasicTypeExpression();
    if (token === Token.BANG) {
        consume(Token.BANG);
        return {
            type: Syntax.NonNullableType,
            expression: expr,
            prefix: false
        };
    }

    if (token === Token.QUESTION) {
        consume(Token.QUESTION);
        return {
            type: Syntax.NullableType,
            expression: expr,
            prefix: false
        };
    }

    if (token === Token.LBRACK) {
        consume(Token.LBRACK);
        expect(Token.RBRACK, 'expected an array-style type declaration (' + value + '[])');
        return {
            type: Syntax.TypeApplication,
            expression: {
                type: Syntax.NameExpression,
                name: 'Array'
            },
            applications: [expr]
        };
    }

    return expr;
}

// TopLevelTypeExpression :=
//      TypeExpression
//    | TypeUnionList
//
// This rule is Google Closure Compiler extension, not ES4
// like,
//   { number | string }
// If strict to ES4, we should write it as
//   { (number|string) }
function parseTop() {
    var expr, elements;

    expr = parseTypeExpression();
    if (token !== Token.PIPE) {
        return expr;
    }

    elements = [expr];
    consume(Token.PIPE);
    while (true) {
        elements.push(parseTypeExpression());
        if (token !== Token.PIPE) {
            break;
        }
        consume(Token.PIPE);
    }

    return {
        type: Syntax.UnionType,
        elements: elements
    };
}

function parseTopParamType() {
    var expr;

    if (token === Token.REST) {
        consume(Token.REST);
        return {
            type: Syntax.RestType,
            expression: parseTop()
        };
    }

    expr = parseTop();
    if (token === Token.EQUAL) {
        consume(Token.EQUAL);
        return {
            type: Syntax.OptionalType,
            expression: expr
        };
    }

    return expr;
}

function parseType(src, opt) {
    var expr;

    source = src;
    length = source.length;
    index = 0;
    previous = 0;

    next();
    expr = parseTop();

    if (opt && opt.midstream) {
        return {
            expression: expr,
            index: previous
        };
    }

    if (token !== Token.EOF) {
        utility.throwError('not reach to EOF');
    }

    return expr;
}

function parseParamType(src, opt) {
    var expr;

    source = src;
    length = source.length;
    index = 0;
    previous = 0;

    next();
    expr = parseTopParamType();

    if (opt && opt.midstream) {
        return {
            expression: expr,
            index: previous
        };
    }

    if (token !== Token.EOF) {
        utility.throwError('not reach to EOF');
    }

    return expr;
}

function stringifyImpl(node, compact, topLevel) {
    var result, i, iz;

    switch (node.type) {
    case Syntax.NullableLiteral:
        result = '?';
        break;

    case Syntax.AllLiteral:
        result = '*';
        break;

    case Syntax.NullLiteral:
        result = 'null';
        break;

    case Syntax.UndefinedLiteral:
        result = 'undefined';
        break;

    case Syntax.VoidLiteral:
        result = 'void';
        break;

    case Syntax.UnionType:
        if (!topLevel) {
            result = '(';
        } else {
            result = '';
        }

        for (i = 0, iz = node.elements.length; i < iz; ++i) {
            result += stringifyImpl(node.elements[i], compact);
            if ((i + 1) !== iz) {
                result += '|';
            }
        }

        if (!topLevel) {
            result += ')';
        }
        break;

    case Syntax.ArrayType:
        result = '[';
        for (i = 0, iz = node.elements.length; i < iz; ++i) {
            result += stringifyImpl(node.elements[i], compact);
            if ((i + 1) !== iz) {
                result += compact ? ',' : ', ';
            }
        }
        result += ']';
        break;

    case Syntax.RecordType:
        result = '{';
        for (i = 0, iz = node.fields.length; i < iz; ++i) {
            result += stringifyImpl(node.fields[i], compact);
            if ((i + 1) !== iz) {
                result += compact ? ',' : ', ';
            }
        }
        result += '}';
        break;

    case Syntax.FieldType:
        if (node.value) {
            result = node.key + (compact ? ':' : ': ') + stringifyImpl(node.value, compact);
        } else {
            result = node.key;
        }
        break;

    case Syntax.FunctionType:
        result = compact ? 'function(' : 'function (';

        if (node['this']) {
            if (node['new']) {
                result += (compact ? 'new:' : 'new: ');
            } else {
                result += (compact ? 'this:' : 'this: ');
            }

            result += stringifyImpl(node['this'], compact);

            if (node.params.length !== 0) {
                result += compact ? ',' : ', ';
            }
        }

        for (i = 0, iz = node.params.length; i < iz; ++i) {
            result += stringifyImpl(node.params[i], compact);
            if ((i + 1) !== iz) {
                result += compact ? ',' : ', ';
            }
        }

        result += ')';

        if (node.result) {
            result += (compact ? ':' : ': ') + stringifyImpl(node.result, compact);
        }
        break;

    case Syntax.ParameterType:
        result = node.name + (compact ? ':' : ': ') + stringifyImpl(node.expression, compact);
        break;

    case Syntax.RestType:
        result = '...';
        if (node.expression) {
            result += stringifyImpl(node.expression, compact);
        }
        break;

    case Syntax.NonNullableType:
        if (node.prefix) {
            result = '!' + stringifyImpl(node.expression, compact);
        } else {
            result = stringifyImpl(node.expression, compact) + '!';
        }
        break;

    case Syntax.OptionalType:
        result = stringifyImpl(node.expression, compact) + '=';
        break;

    case Syntax.NullableType:
        if (node.prefix) {
            result = '?' + stringifyImpl(node.expression, compact);
        } else {
            result = stringifyImpl(node.expression, compact) + '?';
        }
        break;

    case Syntax.NameExpression:
        result = node.name;
        break;

    case Syntax.TypeApplication:
        result = stringifyImpl(node.expression, compact) + '.<';
        for (i = 0, iz = node.applications.length; i < iz; ++i) {
            result += stringifyImpl(node.applications[i], compact);
            if ((i + 1) !== iz) {
                result += compact ? ',' : ', ';
            }
        }
        result += '>';
        break;

    default:
        utility.throwError('Unknown type ' + node.type);
    }

    return result;
}

function stringify(node, options) {
    if (options == null) {
        options = {};
    }
    return stringifyImpl(node, options.compact, options.topLevel);
}

exports.parseType = parseType;
exports.parseParamType = parseParamType;
exports.stringify = stringify;
exports.Syntax = Syntax;

}()); /* vim: set sw=4 ts=4 et tw=80 : */

},{“./utility”:12,“esutils”:16}],12:[function(require,module,exports){ /*

* @fileoverview Utilities for Doctrine
* @author Yusuke Suzuki <utatane.tea@gmail.com>
*/

(function () {

'use strict';

var VERSION;

VERSION = require('../package.json').version;
exports.VERSION = VERSION;

function DoctrineError(message) {
    this.name = 'DoctrineError';
    this.message = message;
}
DoctrineError.prototype = (function () {
    var Middle = function () { };
    Middle.prototype = Error.prototype;
    return new Middle();
}());
DoctrineError.prototype.constructor = DoctrineError;
exports.DoctrineError = DoctrineError;

function throwError(message) {
    throw new DoctrineError(message);
}
exports.throwError = throwError;

exports.assert = require('assert');

}());

/* vim: set sw=4 ts=4 et tw=80 : */

},{“../package.json”:17,“assert”:5}],13:[function(require,module,exports){ /*

Copyright (C) 2013 Yusuke Suzuki <utatane.tea@gmail.com>

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 <COPYRIGHT HOLDER> BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

*/

(function () {

'use strict';

function isExpression(node) {
    if (node == null) { return false; }
    switch (node.type) {
        case 'ArrayExpression':
        case 'AssignmentExpression':
        case 'BinaryExpression':
        case 'CallExpression':
        case 'ConditionalExpression':
        case 'FunctionExpression':
        case 'Identifier':
        case 'Literal':
        case 'LogicalExpression':
        case 'MemberExpression':
        case 'NewExpression':
        case 'ObjectExpression':
        case 'SequenceExpression':
        case 'ThisExpression':
        case 'UnaryExpression':
        case 'UpdateExpression':
            return true;
    }
    return false;
}

function isIterationStatement(node) {
    if (node == null) { return false; }
    switch (node.type) {
        case 'DoWhileStatement':
        case 'ForInStatement':
        case 'ForStatement':
        case 'WhileStatement':
            return true;
    }
    return false;
}

function isStatement(node) {
    if (node == null) { return false; }
    switch (node.type) {
        case 'BlockStatement':
        case 'BreakStatement':
        case 'ContinueStatement':
        case 'DebuggerStatement':
        case 'DoWhileStatement':
        case 'EmptyStatement':
        case 'ExpressionStatement':
        case 'ForInStatement':
        case 'ForStatement':
        case 'IfStatement':
        case 'LabeledStatement':
        case 'ReturnStatement':
        case 'SwitchStatement':
        case 'ThrowStatement':
        case 'TryStatement':
        case 'VariableDeclaration':
        case 'WhileStatement':
        case 'WithStatement':
            return true;
    }
    return false;
}

function isSourceElement(node) {
  return isStatement(node) || node != null && node.type === 'FunctionDeclaration';
}

function trailingStatement(node) {
    switch (node.type) {
    case 'IfStatement':
        if (node.alternate != null) {
            return node.alternate;
        }
        return node.consequent;

    case 'LabeledStatement':
    case 'ForStatement':
    case 'ForInStatement':
    case 'WhileStatement':
    case 'WithStatement':
        return node.body;
    }
    return null;
}

function isProblematicIfStatement(node) {
    var current;

    if (node.type !== 'IfStatement') {
        return false;
    }
    if (node.alternate == null) {
        return false;
    }
    current = node.consequent;
    do {
        if (current.type === 'IfStatement') {
            if (current.alternate == null)  {
                return true;
            }
        }
        current = trailingStatement(current);
    } while (current);

    return false;
}

module.exports = {
    isExpression: isExpression,
    isStatement: isStatement,
    isIterationStatement: isIterationStatement,
    isSourceElement: isSourceElement,
    isProblematicIfStatement: isProblematicIfStatement,

    trailingStatement: trailingStatement
};

}()); /* vim: set sw=4 ts=4 et tw=80 : */

},{}],14:[function(require,module,exports){ /*

Copyright (C) 2013-2014 Yusuke Suzuki <utatane.tea@gmail.com>
Copyright (C) 2014 Ivan Nikulin <ifaaan@gmail.com>

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 <COPYRIGHT HOLDER> BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

*/

(function () {

'use strict';

var Regex, NON_ASCII_WHITESPACES;

// See `tools/generate-identifier-regex.js`.
Regex = {
    NonAsciiIdentifierStart: new RegExp('[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F0\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]'),
    NonAsciiIdentifierPart: new RegExp('[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u0527\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\u08A2-\u08AC\u08E4-\u08FE\u0900-\u0963\u0966-\u096F\u0971-\u0977\u0979-\u097F\u0981-\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\u0C01-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58\u0C59\u0C60-\u0C63\u0C66-\u0C6F\u0C82\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\u0D02\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\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-\u16F0\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-\u191C\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\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1D00-\u1DE6\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-\uA697\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7B\uAA80-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\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-\uFE26\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]')
};

function isDecimalDigit(ch) {
    return (ch >= 48 && ch <= 57);   // 0..9
}

function isHexDigit(ch) {
    return isDecimalDigit(ch) ||    // 0..9
        (97 <= ch && ch <= 102) ||  // a..f
        (65 <= ch && ch <= 70);     // A..F
}

function isOctalDigit(ch) {
    return (ch >= 48 && ch <= 55);   // 0..7
}

// 7.2 White Space

NON_ASCII_WHITESPACES = [
    0x1680, 0x180E,
    0x2000, 0x2001, 0x2002, 0x2003, 0x2004, 0x2005, 0x2006, 0x2007, 0x2008, 0x2009, 0x200A,
    0x202F, 0x205F,
    0x3000,
    0xFEFF
];

function isWhiteSpace(ch) {
    return (ch === 0x20) || (ch === 0x09) || (ch === 0x0B) || (ch === 0x0C) || (ch === 0xA0) ||
        (ch >= 0x1680 && NON_ASCII_WHITESPACES.indexOf(ch) >= 0);
}

// 7.3 Line Terminators

function isLineTerminator(ch) {
    return (ch === 0x0A) || (ch === 0x0D) || (ch === 0x2028) || (ch === 0x2029);
}

// 7.6 Identifier Names and Identifiers

function isIdentifierStart(ch) {
    return (ch >= 97 && ch <= 122) ||     // a..z
        (ch >= 65 && ch <= 90) ||         // A..Z
        (ch === 36) || (ch === 95) ||     // $ (dollar) and _ (underscore)
        (ch === 92) ||                    // \ (backslash)
        ((ch >= 0x80) && Regex.NonAsciiIdentifierStart.test(String.fromCharCode(ch)));
}

function isIdentifierPart(ch) {
    return (ch >= 97 && ch <= 122) ||     // a..z
        (ch >= 65 && ch <= 90) ||         // A..Z
        (ch >= 48 && ch <= 57) ||         // 0..9
        (ch === 36) || (ch === 95) ||     // $ (dollar) and _ (underscore)
        (ch === 92) ||                    // \ (backslash)
        ((ch >= 0x80) && Regex.NonAsciiIdentifierPart.test(String.fromCharCode(ch)));
}

module.exports = {
    isDecimalDigit: isDecimalDigit,
    isHexDigit: isHexDigit,
    isOctalDigit: isOctalDigit,
    isWhiteSpace: isWhiteSpace,
    isLineTerminator: isLineTerminator,
    isIdentifierStart: isIdentifierStart,
    isIdentifierPart: isIdentifierPart
};

}()); /* vim: set sw=4 ts=4 et tw=80 : */

},{}],15:[function(require,module,exports){ /*

Copyright (C) 2013 Yusuke Suzuki <utatane.tea@gmail.com>

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 <COPYRIGHT HOLDER> BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

*/

(function () {

'use strict';

var code = require('./code');

function isStrictModeReservedWordES6(id) {
    switch (id) {
    case 'implements':
    case 'interface':
    case 'package':
    case 'private':
    case 'protected':
    case 'public':
    case 'static':
    case 'let':
        return true;
    default:
        return false;
    }
}

function isKeywordES5(id, strict) {
    // yield should not be treated as keyword under non-strict mode.
    if (!strict && id === 'yield') {
        return false;
    }
    return isKeywordES6(id, strict);
}

function isKeywordES6(id, strict) {
    if (strict && isStrictModeReservedWordES6(id)) {
        return true;
    }

    switch (id.length) {
    case 2:
        return (id === 'if') || (id === 'in') || (id === 'do');
    case 3:
        return (id === 'var') || (id === 'for') || (id === 'new') || (id === 'try');
    case 4:
        return (id === 'this') || (id === 'else') || (id === 'case') ||
            (id === 'void') || (id === 'with') || (id === 'enum');
    case 5:
        return (id === 'while') || (id === 'break') || (id === 'catch') ||
            (id === 'throw') || (id === 'const') || (id === 'yield') ||
            (id === 'class') || (id === 'super');
    case 6:
        return (id === 'return') || (id === 'typeof') || (id === 'delete') ||
            (id === 'switch') || (id === 'export') || (id === 'import');
    case 7:
        return (id === 'default') || (id === 'finally') || (id === 'extends');
    case 8:
        return (id === 'function') || (id === 'continue') || (id === 'debugger');
    case 10:
        return (id === 'instanceof');
    default:
        return false;
    }
}

function isReservedWordES5(id, strict) {
    return id === 'null' || id === 'true' || id === 'false' || isKeywordES5(id, strict);
}

function isReservedWordES6(id, strict) {
    return id === 'null' || id === 'true' || id === 'false' || isKeywordES6(id, strict);
}

function isRestrictedWord(id) {
    return id === 'eval' || id === 'arguments';
}

function isIdentifierName(id) {
    var i, iz, ch;

    if (id.length === 0) {
        return false;
    }

    ch = id.charCodeAt(0);
    if (!code.isIdentifierStart(ch) || ch === 92) {  // \ (backslash)
        return false;
    }

    for (i = 1, iz = id.length; i < iz; ++i) {
        ch = id.charCodeAt(i);
        if (!code.isIdentifierPart(ch) || ch === 92) {  // \ (backslash)
            return false;
        }
    }
    return true;
}

function isIdentifierES5(id, strict) {
    return isIdentifierName(id) && !isReservedWordES5(id, strict);
}

function isIdentifierES6(id, strict) {
    return isIdentifierName(id) && !isReservedWordES6(id, strict);
}

module.exports = {
    isKeywordES5: isKeywordES5,
    isKeywordES6: isKeywordES6,
    isReservedWordES5: isReservedWordES5,
    isReservedWordES6: isReservedWordES6,
    isRestrictedWord: isRestrictedWord,
    isIdentifierName: isIdentifierName,
    isIdentifierES5: isIdentifierES5,
    isIdentifierES6: isIdentifierES6
};

}()); /* vim: set sw=4 ts=4 et tw=80 : */

},{“./code”:14}],16:[function(require,module,exports){ /*

Copyright (C) 2013 Yusuke Suzuki <utatane.tea@gmail.com>

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 <COPYRIGHT HOLDER> BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

*/

(function () {

'use strict';

exports.ast = require('./ast');
exports.code = require('./code');
exports.keyword = require('./keyword');

}()); /* vim: set sw=4 ts=4 et tw=80 : */

},{“./ast”:13,“./code”:14,“./keyword”:15}],17:[function(require,module,exports){ module.exports={

"_args": [
  [
    {
      "name": "doctrine",
      "raw": "doctrine@^1.2.2",
      "rawSpec": "^1.2.2",
      "scope": null,
      "spec": ">=1.2.2 <2.0.0",
      "type": "range"
    },
    "/Users/dennis/Projects/eslintrb/vendor/eslint"
  ]
],
"_from": "doctrine@>=1.2.2 <2.0.0",
"_id": "doctrine@1.2.2",
"_inCache": true,
"_installable": true,
"_location": "/doctrine",
"_nodeVersion": "4.4.2",
"_npmOperationalInternal": {
  "host": "packages-16-east.internal.npmjs.com",
  "tmp": "tmp/doctrine-1.2.2.tgz_1463692862416_0.07905266736634076"
},
"_npmUser": {
  "email": "nicholas@nczconsulting.com",
  "name": "nzakas"
},
"_npmVersion": "2.15.0",
"_phantomChildren": {},
"_requested": {
  "name": "doctrine",
  "raw": "doctrine@^1.2.2",
  "rawSpec": "^1.2.2",
  "scope": null,
  "spec": ">=1.2.2 <2.0.0",
  "type": "range"
},
"_requiredBy": [
  "/"
],
"_resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.2.2.tgz",
"_shasum": "9e9867210149548b95ec51469dae4caad312308e",
"_shrinkwrap": null,
"_spec": "doctrine@^1.2.2",
"_where": "/Users/dennis/Projects/eslintrb/vendor/eslint",
"bugs": {
  "url": "https://github.com/eslint/doctrine/issues"
},
"dependencies": {
  "esutils": "^1.1.6",
  "isarray": "^1.0.0"
},
"description": "JSDoc parser",
"devDependencies": {
  "coveralls": "^2.11.2",
  "dateformat": "^1.0.11",
  "eslint": "^1.10.3",
  "eslint-release": "^0.3.0",
  "istanbul": "^0.4.1",
  "linefix": "^0.1.1",
  "mocha": "^2.3.3",
  "npm-license": "^0.3.1",
  "semver": "^5.0.3",
  "shelljs": "^0.5.3",
  "shelljs-nodecli": "^0.1.1",
  "should": "^5.0.1"
},
"directories": {
  "lib": "./lib"
},
"dist": {
  "shasum": "9e9867210149548b95ec51469dae4caad312308e",
  "tarball": "https://registry.npmjs.org/doctrine/-/doctrine-1.2.2.tgz"
},
"engines": {
  "node": ">=0.10.0"
},
"files": [
  "lib",
  "LICENSE.BSD",
  "LICENSE.closure-compiler",
  "LICENSE.esprima",
  "README.md"
],
"gitHead": "fedfef2642a3631b22e995a3b833bd937a283ec1",
"homepage": "https://github.com/eslint/doctrine",
"licenses": [
  {
    "type": "BSD",
    "url": "http://github.com/eslint/doctrine/raw/master/LICENSE.BSD"
  }
],
"main": "lib/doctrine.js",
"maintainers": [
  {
    "email": "utatane.tea@gmail.com",
    "name": "constellation"
  },
  {
    "email": "nicholas@nczconsulting.com",
    "name": "nzakas"
  }
],
"name": "doctrine",
"optionalDependencies": {},
"readme": "ERROR: No README data found!",
"repository": {
  "type": "git",
  "url": "git+ssh://git@github.com/eslint/doctrine.git"
},
"scripts": {
  "alpharelease": "eslint-prerelease alpha",
  "betarelease": "eslint-prerelease beta",
  "lint": "eslint lib/",
  "release": "eslint-release",
  "test": "npm run lint && node Makefile.js test"
},
"version": "1.2.2"

}

},{}],18:[function(require,module,exports){ // Inspired by Google Closure: // closure-library.googlecode.com/svn/docs/ // closure_goog_array_array.js.html#goog.array.clear

‘use strict’;

var value = require(‘../../object/valid-value’);

module.exports = function () {

value(this).length = 0;
return this;

};

},{“../../object/valid-value”:46}],19:[function(require,module,exports){ ‘use strict’;

var toPosInt = require(‘../../number/to-pos-integer’)

, value    = require('../../object/valid-value')

, indexOf = Array.prototype.indexOf
, hasOwnProperty = Object.prototype.hasOwnProperty
, abs = Math.abs, floor = Math.floor;

module.exports = function (searchElement/*, fromIndex*/) {

var i, l, fromIndex, val;
if (searchElement === searchElement) { //jslint: ignore
        return indexOf.apply(this, arguments);
}

l = toPosInt(value(this).length);
fromIndex = arguments[1];
if (isNaN(fromIndex)) fromIndex = 0;
else if (fromIndex >= 0) fromIndex = floor(fromIndex);
else fromIndex = toPosInt(this.length) - floor(abs(fromIndex));

for (i = fromIndex; i < l; ++i) {
        if (hasOwnProperty.call(this, i)) {
                val = this[i];
                if (val !== val) return i; //jslint: ignore
        }
}
return -1;

};

},{“../../number/to-pos-integer”:25,“../../object/valid-value”:46}],20:[function(require,module,exports){ ‘use strict’;

var toString = Object.prototype.toString

, id = toString.call((function () { return arguments; }()));

module.exports = function (x) { return (toString.call(x) === id); };

},{}],21:[function(require,module,exports){ ‘use strict’;

module.exports = require(‘./is-implemented’)()

? Math.sign
: require('./shim');

},{“./is-implemented”:22,“./shim”:23}],22:[function(require,module,exports){ ‘use strict’;

module.exports = function () {

var sign = Math.sign;
if (typeof sign !== 'function') return false;
return ((sign(10) === 1) && (sign(-20) === -1));

};

},{}],23:[function(require,module,exports){ ‘use strict’;

module.exports = function (value) {

value = Number(value);
if (isNaN(value) || (value === 0)) return value;
return (value > 0) ? 1 : -1;

};

},{}],24:[function(require,module,exports){ ‘use strict’;

var sign = require(‘../math/sign’)

, abs = Math.abs, floor = Math.floor;

module.exports = function (value) {

if (isNaN(value)) return 0;
value = Number(value);
if ((value === 0) || !isFinite(value)) return value;
return sign(value) * floor(abs(value));

};

},{“../math/sign”:21}],25:[function(require,module,exports){ ‘use strict’;

var toInteger = require(‘./to-integer’)

, max = Math.max;

module.exports = function (value) { return max(0, toInteger(value)); };

},{“./to-integer”:24}],26:[function(require,module,exports){ // Internal method, used by iteration functions. // Calls a function for each key-value pair found in object // Optionally takes compareFn to iterate object in specific order

‘use strict’;

var callable = require(‘./valid-callable’)

, value    = require('./valid-value')

, bind = Function.prototype.bind, call = Function.prototype.call, keys = Object.keys
, propertyIsEnumerable = Object.prototype.propertyIsEnumerable;

module.exports = function (method, defVal) {

return function (obj, cb/*, thisArg, compareFn*/) {
        var list, thisArg = arguments[2], compareFn = arguments[3];
        obj = Object(value(obj));
        callable(cb);

        list = keys(obj);
        if (compareFn) {
                list.sort((typeof compareFn === 'function') ? bind.call(compareFn, obj) : undefined);
        }
        if (typeof method !== 'function') method = list[method];
        return call.call(method, list, function (key, index) {
                if (!propertyIsEnumerable.call(obj, key)) return defVal;
                return call.call(cb, thisArg, obj[key], key, obj, index);
        });
};

};

},{“./valid-callable”:44,“./valid-value”:46}],27:[function(require,module,exports){ ‘use strict’;

module.exports = require(‘./is-implemented’)()

? Object.assign
: require('./shim');

},{“./is-implemented”:28,“./shim”:29}],28:[function(require,module,exports){ ‘use strict’;

module.exports = function () {

var assign = Object.assign, obj;
if (typeof assign !== 'function') return false;
obj = { foo: 'raz' };
assign(obj, { bar: 'dwa' }, { trzy: 'trzy' });
return (obj.foo + obj.bar + obj.trzy) === 'razdwatrzy';

};

},{}],29:[function(require,module,exports){ ‘use strict’;

var keys = require(‘../keys’)

, value = require('../valid-value')

, max = Math.max;

module.exports = function (dest, src/*, …srcn*/) {

var error, i, l = max(arguments.length, 2), assign;
dest = Object(value(dest));
assign = function (key) {
        try { dest[key] = src[key]; } catch (e) {
                if (!error) error = e;
        }
};
for (i = 1; i < l; ++i) {
        src = arguments[i];
        keys(src).forEach(assign);
}
if (error !== undefined) throw error;
return dest;

};

},{“../keys”:35,“../valid-value”:46}],30:[function(require,module,exports){ ‘use strict’;

var assign = require(‘./assign’)

, value  = require('./valid-value');

module.exports = function (obj) {

var copy = Object(value(obj));
if (copy !== obj) return copy;
return assign({}, obj);

};

},{“./assign”:27,“./valid-value”:46}],31:[function(require,module,exports){ // Workaround for code.google.com/p/v8/issues/detail?id=2804

‘use strict’;

var create = Object.create, shim;

if (!require(‘./set-prototype-of/is-implemented’)()) {

shim = require('./set-prototype-of/shim');

}

module.exports = (function () {

var nullObject, props, desc;
if (!shim) return create;
if (shim.level !== 1) return create;

nullObject = {};
props = {};
desc = { configurable: false, enumerable: false, writable: true,
        value: undefined };
Object.getOwnPropertyNames(Object.prototype).forEach(function (name) {
        if (name === '__proto__') {
                props[name] = { configurable: true, enumerable: false, writable: true,
                        value: undefined };
                return;
        }
        props[name] = desc;
});
Object.defineProperties(nullObject, props);

Object.defineProperty(shim, 'nullPolyfill', { configurable: false,
        enumerable: false, writable: false, value: nullObject });

return function (prototype, props) {
        return create((prototype === null) ? nullObject : prototype, props);
};

}());

},{“./set-prototype-of/is-implemented”:42,“./set-prototype-of/shim”:43}],32:[function(require,module,exports){ ‘use strict’;

module.exports = require(‘./_iterate’)(‘forEach’);

},{“./_iterate”:26}],33:[function(require,module,exports){ // Deprecated

‘use strict’;

module.exports = function (obj) { return typeof obj === ‘function’; };

},{}],34:[function(require,module,exports){ ‘use strict’;

var map = { function: true, object: true };

module.exports = function (x) {

return ((x != null) && map[typeof x]) || false;

};

},{}],35:[function(require,module,exports){ ‘use strict’;

module.exports = require(‘./is-implemented’)()

? Object.keys
: require('./shim');

},{“./is-implemented”:36,“./shim”:37}],36:[function(require,module,exports){ ‘use strict’;

module.exports = function () {

try {
        Object.keys('primitive');
        return true;
} catch (e) { return false; }

};

},{}],37:[function(require,module,exports){ ‘use strict’;

var keys = Object.keys;

module.exports = function (object) {

return keys(object == null ? object : Object(object));

};

},{}],38:[function(require,module,exports){ ‘use strict’;

var callable = require(‘./valid-callable’)

, forEach  = require('./for-each')

, call = Function.prototype.call;

module.exports = function (obj, cb/*, thisArg*/) {

var o = {}, thisArg = arguments[2];
callable(cb);
forEach(obj, function (value, key, obj, index) {
        o[key] = call.call(cb, thisArg, value, key, obj, index);
});
return o;

};

},{“./for-each”:32,“./valid-callable”:44}],39:[function(require,module,exports){ ‘use strict’;

var forEach = Array.prototype.forEach, create = Object.create;

var process = function (src, obj) {

var key;
for (key in src) obj[key] = src[key];

};

module.exports = function (options/*, …options*/) {

var result = create(null);
forEach.call(arguments, function (options) {
        if (options == null) return;
        process(Object(options), result);
});
return result;

};

},{}],40:[function(require,module,exports){ ‘use strict’;

var forEach = Array.prototype.forEach, create = Object.create;

module.exports = function (arg/*, …args*/) {

var set = create(null);
forEach.call(arguments, function (name) { set[name] = true; });
return set;

};

},{}],41:[function(require,module,exports){ ‘use strict’;

module.exports = require(‘./is-implemented’)()

? Object.setPrototypeOf
: require('./shim');

},{“./is-implemented”:42,“./shim”:43}],42:[function(require,module,exports){ ‘use strict’;

var create = Object.create, getPrototypeOf = Object.getPrototypeOf

, x = {};

module.exports = function (/customCreate/) {

var setPrototypeOf = Object.setPrototypeOf
  , customCreate = arguments[0] || create;
if (typeof setPrototypeOf !== 'function') return false;
return getPrototypeOf(setPrototypeOf(customCreate(null), x)) === x;

};

},{}],43:[function(require,module,exports){ // Big thanks to @WebReflection for sorting this out // gist.github.com/WebReflection/5593554

‘use strict’;

var isObject = require(‘../is-object’)

, value         = require('../valid-value')

, isPrototypeOf = Object.prototype.isPrototypeOf
, defineProperty = Object.defineProperty
, nullDesc = { configurable: true, enumerable: false, writable: true,
              value: undefined }
, validate;

validate = function (obj, prototype) {

value(obj);
if ((prototype === null) || isObject(prototype)) return obj;
throw new TypeError('Prototype must be null or an object');

};

module.exports = (function (status) {

var fn, set;
if (!status) return null;
if (status.level === 2) {
        if (status.set) {
                set = status.set;
                fn = function (obj, prototype) {
                        set.call(validate(obj, prototype), prototype);
                        return obj;
                };
        } else {
                fn = function (obj, prototype) {
                        validate(obj, prototype).__proto__ = prototype;
                        return obj;
                };
        }
} else {
        fn = function self(obj, prototype) {
                var isNullBase;
                validate(obj, prototype);
                isNullBase = isPrototypeOf.call(self.nullPolyfill, obj);
                if (isNullBase) delete self.nullPolyfill.__proto__;
                if (prototype === null) prototype = self.nullPolyfill;
                obj.__proto__ = prototype;
                if (isNullBase) defineProperty(self.nullPolyfill, '__proto__', nullDesc);
                return obj;
        };
}
return Object.defineProperty(fn, 'level', { configurable: false,
        enumerable: false, writable: false, value: status.level });

}((function () {

var x = Object.create(null), y = {}, set
  , desc = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__');

if (desc) {
        try {
                set = desc.set; // Opera crashes at this point
                set.call(x, y);
        } catch (ignore) { }
        if (Object.getPrototypeOf(x) === y) return { set: set, level: 2 };
}

x.__proto__ = y;
if (Object.getPrototypeOf(x) === y) return { level: 2 };

x = {};
x.__proto__ = y;
if (Object.getPrototypeOf(x) === y) return { level: 1 };

return false;

}())));

require(‘../create’);

},{“../create”:31,“../is-object”:34,“../valid-value”:46}],44:[function(require,module,exports){ ‘use strict’;

module.exports = function (fn) {

if (typeof fn !== 'function') throw new TypeError(fn + " is not a function");
return fn;

};

},{}],45:[function(require,module,exports){ ‘use strict’;

var isObject = require(‘./is-object’);

module.exports = function (value) {

if (!isObject(value)) throw new TypeError(value + " is not an Object");
return value;

};

},{“./is-object”:34}],46:[function(require,module,exports){ ‘use strict’;

module.exports = function (value) {

if (value == null) throw new TypeError("Cannot use null or undefined");
return value;

};

},{}],47:[function(require,module,exports){ ‘use strict’;

module.exports = require(‘./is-implemented’)()

? String.prototype.contains
: require('./shim');

},{“./is-implemented”:48,“./shim”:49}],48:[function(require,module,exports){ ‘use strict’;

var str = ‘razdwatrzy’;

module.exports = function () {

if (typeof str.contains !== 'function') return false;
return ((str.contains('dwa') === true) && (str.contains('foo') === false));

};

},{}],49:[function(require,module,exports){ ‘use strict’;

var indexOf = String.prototype.indexOf;

module.exports = function (searchString/*, position*/) {

return indexOf.call(this, searchString, arguments[1]) > -1;

};

},{}],50:[function(require,module,exports){ ‘use strict’;

var toString = Object.prototype.toString

, id = toString.call('');

module.exports = function (x) {

return (typeof x === 'string') || (x && (typeof x === 'object') &&
        ((x instanceof String) || (toString.call(x) === id))) || false;

};

},{}],51:[function(require,module,exports){ ‘use strict’;

var generated = Object.create(null)

, random = Math.random;

module.exports = function () {

var str;
do { str = random().toString(36).slice(2); } while (generated[str]);
return str;

};

},{}],52:[function(require,module,exports){ ‘use strict’;

var setPrototypeOf = require(‘es5-ext/object/set-prototype-of’)

, contains       = require('es5-ext/string/#/contains')
, d              = require('d')
, Iterator       = require('./')

, defineProperty = Object.defineProperty
, ArrayIterator;

ArrayIterator = module.exports = function (arr, kind) {

if (!(this instanceof ArrayIterator)) return new ArrayIterator(arr, kind);
Iterator.call(this, arr);
if (!kind) kind = 'value';
else if (contains.call(kind, 'key+value')) kind = 'key+value';
else if (contains.call(kind, 'key')) kind = 'key';
else kind = 'value';
defineProperty(this, '__kind__', d('', kind));

}; if (setPrototypeOf) setPrototypeOf(ArrayIterator, Iterator);

ArrayIterator.prototype = Object.create(Iterator.prototype, {

constructor: d(ArrayIterator),
_resolve: d(function (i) {
        if (this.__kind__ === 'value') return this.__list__[i];
        if (this.__kind__ === 'key+value') return [i, this.__list__[i]];
        return i;
}),
toString: d(function () { return '[object Array Iterator]'; })

});

},{“./”:55,“d”:7,“es5-ext/object/set-prototype-of”:41,“es5-ext/string/#/contains”:47}],53:[function(require,module,exports){ ‘use strict’;

var isArguments = require(‘es5-ext/function/is-arguments’)

, callable    = require('es5-ext/object/valid-callable')
, isString    = require('es5-ext/string/is-string')
, get         = require('./get')

, isArray = Array.isArray, call = Function.prototype.call
, some = Array.prototype.some;

module.exports = function (iterable, cb/*, thisArg*/) {

var mode, thisArg = arguments[2], result, doBreak, broken, i, l, char, code;
if (isArray(iterable) || isArguments(iterable)) mode = 'array';
else if (isString(iterable)) mode = 'string';
else iterable = get(iterable);

callable(cb);
doBreak = function () { broken = true; };
if (mode === 'array') {
        some.call(iterable, function (value) {
                call.call(cb, thisArg, value, doBreak);
                if (broken) return true;
        });
        return;
}
if (mode === 'string') {
        l = iterable.length;
        for (i = 0; i < l; ++i) {
                char = iterable[i];
                if ((i + 1) < l) {
                        code = char.charCodeAt(0);
                        if ((code >= 0xD800) && (code <= 0xDBFF)) char += iterable[++i];
                }
                call.call(cb, thisArg, char, doBreak);
                if (broken) break;
        }
        return;
}
result = iterable.next();

while (!result.done) {
        call.call(cb, thisArg, result.value, doBreak);
        if (broken) return;
        result = iterable.next();
}

};

},{“./get”:54,“es5-ext/function/is-arguments”:20,“es5-ext/object/valid-callable”:44,“es5-ext/string/is-string”:50}],54:[function(require,module,exports){ ‘use strict’;

var isArguments = require(‘es5-ext/function/is-arguments’)

, isString       = require('es5-ext/string/is-string')
, ArrayIterator  = require('./array')
, StringIterator = require('./string')
, iterable       = require('./valid-iterable')
, iteratorSymbol = require('es6-symbol').iterator;

module.exports = function (obj) {

if (typeof iterable(obj)[iteratorSymbol] === 'function') return obj[iteratorSymbol]();
if (isArguments(obj)) return new ArrayIterator(obj);
if (isString(obj)) return new StringIterator(obj);
return new ArrayIterator(obj);

};

},{“./array”:52,“./string”:57,“./valid-iterable”:58,“es5-ext/function/is-arguments”:20,“es5-ext/string/is-string”:50,“es6-symbol”:65}],55:[function(require,module,exports){ ‘use strict’;

var clear = require(‘es5-ext/array/#/clear’)

, assign   = require('es5-ext/object/assign')
, callable = require('es5-ext/object/valid-callable')
, value    = require('es5-ext/object/valid-value')
, d        = require('d')
, autoBind = require('d/auto-bind')
, Symbol   = require('es6-symbol')

, defineProperty = Object.defineProperty
, defineProperties = Object.defineProperties
, Iterator;

module.exports = Iterator = function (list, context) {

if (!(this instanceof Iterator)) return new Iterator(list, context);
defineProperties(this, {
        __list__: d('w', value(list)),
        __context__: d('w', context),
        __nextIndex__: d('w', 0)
});
if (!context) return;
callable(context.on);
context.on('_add', this._onAdd);
context.on('_delete', this._onDelete);
context.on('_clear', this._onClear);

};

defineProperties(Iterator.prototype, assign({

constructor: d(Iterator),
_next: d(function () {
        var i;
        if (!this.__list__) return;
        if (this.__redo__) {
                i = this.__redo__.shift();
                if (i !== undefined) return i;
        }
        if (this.__nextIndex__ < this.__list__.length) return this.__nextIndex__++;
        this._unBind();
}),
next: d(function () { return this._createResult(this._next()); }),
_createResult: d(function (i) {
        if (i === undefined) return { done: true, value: undefined };
        return { done: false, value: this._resolve(i) };
}),
_resolve: d(function (i) { return this.__list__[i]; }),
_unBind: d(function () {
        this.__list__ = null;
        delete this.__redo__;
        if (!this.__context__) return;
        this.__context__.off('_add', this._onAdd);
        this.__context__.off('_delete', this._onDelete);
        this.__context__.off('_clear', this._onClear);
        this.__context__ = null;
}),
toString: d(function () { return '[object Iterator]'; })

}, autoBind({

_onAdd: d(function (index) {
        if (index >= this.__nextIndex__) return;
        ++this.__nextIndex__;
        if (!this.__redo__) {
                defineProperty(this, '__redo__', d('c', [index]));
                return;
        }
        this.__redo__.forEach(function (redo, i) {
                if (redo >= index) this.__redo__[i] = ++redo;
        }, this);
        this.__redo__.push(index);
}),
_onDelete: d(function (index) {
        var i;
        if (index >= this.__nextIndex__) return;
        --this.__nextIndex__;
        if (!this.__redo__) return;
        i = this.__redo__.indexOf(index);
        if (i !== -1) this.__redo__.splice(i, 1);
        this.__redo__.forEach(function (redo, i) {
                if (redo > index) this.__redo__[i] = --redo;
        }, this);
}),
_onClear: d(function () {
        if (this.__redo__) clear.call(this.__redo__);
        this.__nextIndex__ = 0;
})

})));

defineProperty(Iterator.prototype, Symbol.iterator, d(function () {

return this;

})); defineProperty(Iterator.prototype, Symbol.toStringTag, d(”, ‘Iterator’));

},{“d”:7,“d/auto-bind”:6,“es5-ext/array/#/clear”:18,“es5-ext/object/assign”:27,“es5-ext/object/valid-callable”:44,“es5-ext/object/valid-value”:46,“es6-symbol”:65}],56:[function(require,module,exports){ ‘use strict’;

var isArguments = require(‘es5-ext/function/is-arguments’)

, isString       = require('es5-ext/string/is-string')
, iteratorSymbol = require('es6-symbol').iterator

, isArray = Array.isArray;

module.exports = function (value) {

if (value == null) return false;
if (isArray(value)) return true;
if (isString(value)) return true;
if (isArguments(value)) return true;
return (typeof value[iteratorSymbol] === 'function');

};

},{“es5-ext/function/is-arguments”:20,“es5-ext/string/is-string”:50,“es6-symbol”:65}],57:[function(require,module,exports){ // Thanks @mathiasbynens // mathiasbynens.be/notes/javascript-unicode#iterating-over-symbols

‘use strict’;

var setPrototypeOf = require(‘es5-ext/object/set-prototype-of’)

, d              = require('d')
, Iterator       = require('./')

, defineProperty = Object.defineProperty
, StringIterator;

StringIterator = module.exports = function (str) {

if (!(this instanceof StringIterator)) return new StringIterator(str);
str = String(str);
Iterator.call(this, str);
defineProperty(this, '__length__', d('', str.length));

}; if (setPrototypeOf) setPrototypeOf(StringIterator, Iterator);

StringIterator.prototype = Object.create(Iterator.prototype, {

constructor: d(StringIterator),
_next: d(function () {
        if (!this.__list__) return;
        if (this.__nextIndex__ < this.__length__) return this.__nextIndex__++;
        this._unBind();
}),
_resolve: d(function (i) {
        var char = this.__list__[i], code;
        if (this.__nextIndex__ === this.__length__) return char;
        code = char.charCodeAt(0);
        if ((code >= 0xD800) && (code <= 0xDBFF)) return char + this.__list__[this.__nextIndex__++];
        return char;
}),
toString: d(function () { return '[object String Iterator]'; })

});

},{“./”:55,“d”:7,“es5-ext/object/set-prototype-of”:41}],58:[function(require,module,exports){ ‘use strict’;

var isIterable = require(‘./is-iterable’);

module.exports = function (value) {

if (!isIterable(value)) throw new TypeError(value + " is not iterable");
return value;

};

},{“./is-iterable”:56}],59:[function(require,module,exports){ ‘use strict’;

module.exports = require(‘./is-implemented’)() ? Map : require(‘./polyfill’);

},{“./is-implemented”:60,“./polyfill”:64}],60:[function(require,module,exports){ ‘use strict’;

module.exports = function () {

var map, iterator, result;
if (typeof Map !== 'function') return false;
try {
        // WebKit doesn't support arguments and crashes
        map = new Map([['raz', 'one'], ['dwa', 'two'], ['trzy', 'three']]);
} catch (e) {
        return false;
}
if (String(map) !== '[object Map]') return false;
if (map.size !== 3) return false;
if (typeof map.clear !== 'function') return false;
if (typeof map.delete !== 'function') return false;
if (typeof map.entries !== 'function') return false;
if (typeof map.forEach !== 'function') return false;
if (typeof map.get !== 'function') return false;
if (typeof map.has !== 'function') return false;
if (typeof map.keys !== 'function') return false;
if (typeof map.set !== 'function') return false;
if (typeof map.values !== 'function') return false;

iterator = map.entries();
result = iterator.next();
if (result.done !== false) return false;
if (!result.value) return false;
if (result.value[0] !== 'raz') return false;
if (result.value[1] !== 'one') return false;

return true;

};

},{}],61:[function(require,module,exports){ // Exports true if environment provides native ‘Map` implementation, // whatever that is.

‘use strict’;

module.exports = (function () {

if (typeof Map === 'undefined') return false;
return (Object.prototype.toString.call(new Map()) === '[object Map]');

}());

},{}],62:[function(require,module,exports){ ‘use strict’;

module.exports = require(‘es5-ext/object/primitive-set’)(‘key’,

'value', 'key+value');

},{“es5-ext/object/primitive-set”:40}],63:[function(require,module,exports){ ‘use strict’;

var setPrototypeOf = require(‘es5-ext/object/set-prototype-of’)

, d                 = require('d')
, Iterator          = require('es6-iterator')
, toStringTagSymbol = require('es6-symbol').toStringTag
, kinds             = require('./iterator-kinds')

, defineProperties = Object.defineProperties
, unBind = Iterator.prototype._unBind
, MapIterator;

MapIterator = module.exports = function (map, kind) {

if (!(this instanceof MapIterator)) return new MapIterator(map, kind);
Iterator.call(this, map.__mapKeysData__, map);
if (!kind || !kinds[kind]) kind = 'key+value';
defineProperties(this, {
        __kind__: d('', kind),
        __values__: d('w', map.__mapValuesData__)
});

}; if (setPrototypeOf) setPrototypeOf(MapIterator, Iterator);

MapIterator.prototype = Object.create(Iterator.prototype, {

constructor: d(MapIterator),
_resolve: d(function (i) {
        if (this.__kind__ === 'value') return this.__values__[i];
        if (this.__kind__ === 'key') return this.__list__[i];
        return [this.__list__[i], this.__values__[i]];
}),
_unBind: d(function () {
        this.__values__ = null;
        unBind.call(this);
}),
toString: d(function () { return '[object Map Iterator]'; })

}); Object.defineProperty(MapIterator.prototype, toStringTagSymbol,

d('c', 'Map Iterator'));

},{“./iterator-kinds”:62,“d”:7,“es5-ext/object/set-prototype-of”:41,“es6-iterator”:55,“es6-symbol”:65}],64:[function(require,module,exports){ ‘use strict’;

var clear = require(‘es5-ext/array/#/clear’)

, eIndexOf       = require('es5-ext/array/#/e-index-of')
, setPrototypeOf = require('es5-ext/object/set-prototype-of')
, callable       = require('es5-ext/object/valid-callable')
, validValue     = require('es5-ext/object/valid-value')
, d              = require('d')
, ee             = require('event-emitter')
, Symbol         = require('es6-symbol')
, iterator       = require('es6-iterator/valid-iterable')
, forOf          = require('es6-iterator/for-of')
, Iterator       = require('./lib/iterator')
, isNative       = require('./is-native-implemented')

, call = Function.prototype.call
, defineProperties = Object.defineProperties, getPrototypeOf = Object.getPrototypeOf
, MapPoly;

module.exports = MapPoly = function (/iterable/) {

var iterable = arguments[0], keys, values, self;
if (!(this instanceof MapPoly)) throw new TypeError('Constructor requires \'new\'');
if (isNative && setPrototypeOf && (Map !== MapPoly)) {
        self = setPrototypeOf(new Map(), getPrototypeOf(this));
} else {
        self = this;
}
if (iterable != null) iterator(iterable);
defineProperties(self, {
        __mapKeysData__: d('c', keys = []),
        __mapValuesData__: d('c', values = [])
});
if (!iterable) return self;
forOf(iterable, function (value) {
        var key = validValue(value)[0];
        value = value[1];
        if (eIndexOf.call(keys, key) !== -1) return;
        keys.push(key);
        values.push(value);
}, self);
return self;

};

if (isNative) {

if (setPrototypeOf) setPrototypeOf(MapPoly, Map);
MapPoly.prototype = Object.create(Map.prototype, {
        constructor: d(MapPoly)
});

}

ee(defineProperties(MapPoly.prototype, {

clear: d(function () {
        if (!this.__mapKeysData__.length) return;
        clear.call(this.__mapKeysData__);
        clear.call(this.__mapValuesData__);
        this.emit('_clear');
}),
delete: d(function (key) {
        var index = eIndexOf.call(this.__mapKeysData__, key);
        if (index === -1) return false;
        this.__mapKeysData__.splice(index, 1);
        this.__mapValuesData__.splice(index, 1);
        this.emit('_delete', index, key);
        return true;
}),
entries: d(function () { return new Iterator(this, 'key+value'); }),
forEach: d(function (cb/*, thisArg*/) {
        var thisArg = arguments[1], iterator, result;
        callable(cb);
        iterator = this.entries();
        result = iterator._next();
        while (result !== undefined) {
                call.call(cb, thisArg, this.__mapValuesData__[result],
                        this.__mapKeysData__[result], this);
                result = iterator._next();
        }
}),
get: d(function (key) {
        var index = eIndexOf.call(this.__mapKeysData__, key);
        if (index === -1) return;
        return this.__mapValuesData__[index];
}),
has: d(function (key) {
        return (eIndexOf.call(this.__mapKeysData__, key) !== -1);
}),
keys: d(function () { return new Iterator(this, 'key'); }),
set: d(function (key, value) {
        var index = eIndexOf.call(this.__mapKeysData__, key), emit;
        if (index === -1) {
                index = this.__mapKeysData__.push(key) - 1;
                emit = true;
        }
        this.__mapValuesData__[index] = value;
        if (emit) this.emit('_add', index, key);
        return this;
}),
size: d.gs(function () { return this.__mapKeysData__.length; }),
values: d(function () { return new Iterator(this, 'value'); }),
toString: d(function () { return '[object Map]'; })

})); Object.defineProperty(MapPoly.prototype, Symbol.iterator, d(function () {

return this.entries();

})); Object.defineProperty(MapPoly.prototype, Symbol.toStringTag, d(‘c’, ‘Map’));

},{“./is-native-implemented”:61,“./lib/iterator”:63,“d”:7,“es5-ext/array/#/clear”:18,“es5-ext/array/#/e-index-of”:19,“es5-ext/object/set-prototype-of”:41,“es5-ext/object/valid-callable”:44,“es5-ext/object/valid-value”:46,“es6-iterator/for-of”:53,“es6-iterator/valid-iterable”:58,“es6-symbol”:65,“event-emitter”:93}],65:[function(require,module,exports){ ‘use strict’;

module.exports = require(‘./is-implemented’)() ? Symbol : require(‘./polyfill’);

},{“./is-implemented”:66,“./polyfill”:68}],66:[function(require,module,exports){ ‘use strict’;

var validTypes = { object: true, symbol: true };

module.exports = function () {

var symbol;
if (typeof Symbol !== 'function') return false;
symbol = Symbol('test symbol');
try { String(symbol); } catch (e) { return false; }

// Return 'true' also for polyfills
if (!validTypes[typeof Symbol.iterator]) return false;
if (!validTypes[typeof Symbol.toPrimitive]) return false;
if (!validTypes[typeof Symbol.toStringTag]) return false;

return true;

};

},{}],67:[function(require,module,exports){ ‘use strict’;

module.exports = function (x) {

if (!x) return false;
if (typeof x === 'symbol') return true;
if (!x.constructor) return false;
if (x.constructor.name !== 'Symbol') return false;
return (x[x.constructor.toStringTag] === 'Symbol');

};

},{}],68:[function(require,module,exports){ // ES2015 Symbol polyfill for environments that do not support it (or partially support it)

‘use strict’;

var d = require(‘d’)

, validateSymbol = require('./validate-symbol')

, create = Object.create, defineProperties = Object.defineProperties
, defineProperty = Object.defineProperty, objPrototype = Object.prototype
, NativeSymbol, SymbolPolyfill, HiddenSymbol, globalSymbols = create(null)
, isNativeSafe;

if (typeof Symbol === ‘function’) {

NativeSymbol = Symbol;
try {
        String(NativeSymbol());
        isNativeSafe = true;
} catch (ignore) {}

}

var generateName = (function () {

var created = create(null);
return function (desc) {
        var postfix = 0, name, ie11BugWorkaround;
        while (created[desc + (postfix || '')]) ++postfix;
        desc += (postfix || '');
        created[desc] = true;
        name = '@@' + desc;
        defineProperty(objPrototype, name, d.gs(null, function (value) {
                // For IE11 issue see:
                // https://connect.microsoft.com/IE/feedbackdetail/view/1928508/
                //    ie11-broken-getters-on-dom-objects
                // https://github.com/medikoo/es6-symbol/issues/12
                if (ie11BugWorkaround) return;
                ie11BugWorkaround = true;
                defineProperty(this, name, d(value));
                ie11BugWorkaround = false;
        }));
        return name;
};

}());

// Internal constructor (not one exposed) for creating Symbol instances. // This one is used to ensure that ‘someSymbol instanceof Symbol` always return false HiddenSymbol = function Symbol(description) {

if (this instanceof HiddenSymbol) throw new TypeError('TypeError: Symbol is not a constructor');
return SymbolPolyfill(description);

};

// Exposed ‘Symbol` constructor // (returns instances of HiddenSymbol) module.exports = SymbolPolyfill = function Symbol(description) {

var symbol;
if (this instanceof Symbol) throw new TypeError('TypeError: Symbol is not a constructor');
if (isNativeSafe) return NativeSymbol(description);
symbol = create(HiddenSymbol.prototype);
description = (description === undefined ? '' : String(description));
return defineProperties(symbol, {
        __description__: d('', description),
        __name__: d('', generateName(description))
});

}; defineProperties(SymbolPolyfill, {

for: d(function (key) {
        if (globalSymbols[key]) return globalSymbols[key];
        return (globalSymbols[key] = SymbolPolyfill(String(key)));
}),
keyFor: d(function (s) {
        var key;
        validateSymbol(s);
        for (key in globalSymbols) if (globalSymbols[key] === s) return key;
}),

// If there's native implementation of given symbol, let's fallback to it
// to ensure proper interoperability with other native functions e.g. Array.from
hasInstance: d('', (NativeSymbol && NativeSymbol.hasInstance) || SymbolPolyfill('hasInstance')),
isConcatSpreadable: d('', (NativeSymbol && NativeSymbol.isConcatSpreadable) ||
        SymbolPolyfill('isConcatSpreadable')),
iterator: d('', (NativeSymbol && NativeSymbol.iterator) || SymbolPolyfill('iterator')),
match: d('', (NativeSymbol && NativeSymbol.match) || SymbolPolyfill('match')),
replace: d('', (NativeSymbol && NativeSymbol.replace) || SymbolPolyfill('replace')),
search: d('', (NativeSymbol && NativeSymbol.search) || SymbolPolyfill('search')),
species: d('', (NativeSymbol && NativeSymbol.species) || SymbolPolyfill('species')),
split: d('', (NativeSymbol && NativeSymbol.split) || SymbolPolyfill('split')),
toPrimitive: d('', (NativeSymbol && NativeSymbol.toPrimitive) || SymbolPolyfill('toPrimitive')),
toStringTag: d('', (NativeSymbol && NativeSymbol.toStringTag) || SymbolPolyfill('toStringTag')),
unscopables: d('', (NativeSymbol && NativeSymbol.unscopables) || SymbolPolyfill('unscopables'))

});

// Internal tweaks for real symbol producer defineProperties(HiddenSymbol.prototype, {

constructor: d(SymbolPolyfill),
toString: d('', function () { return this.__name__; })

});

// Proper implementation of methods exposed on Symbol.prototype // They won’t be accessible on produced symbol instances as they derive from HiddenSymbol.prototype defineProperties(SymbolPolyfill.prototype, {

toString: d(function () { return 'Symbol (' + validateSymbol(this).__description__ + ')'; }),
valueOf: d(function () { return validateSymbol(this); })

}); defineProperty(SymbolPolyfill.prototype, SymbolPolyfill.toPrimitive, d(”, function () {

var symbol = validateSymbol(this);
if (typeof symbol === 'symbol') return symbol;
return symbol.toString();

})); defineProperty(SymbolPolyfill.prototype, SymbolPolyfill.toStringTag, d(‘c’, ‘Symbol’));

// Proper implementaton of toPrimitive and toStringTag for returned symbol instances defineProperty(HiddenSymbol.prototype, SymbolPolyfill.toStringTag,

d('c', SymbolPolyfill.prototype[SymbolPolyfill.toStringTag]));

// Note: It’s important to define ‘toPrimitive` as last one, as some implementations // implement `toPrimitive` natively without implementing `toStringTag` (or other specified symbols) // And that may invoke error in definition flow: // See: github.com/medikoo/es6-symbol/issues/13#issuecomment-164146149 defineProperty(HiddenSymbol.prototype, SymbolPolyfill.toPrimitive,

d('c', SymbolPolyfill.prototype[SymbolPolyfill.toPrimitive]));

},{“./validate-symbol”:69,“d”:7}],69:[function(require,module,exports){ ‘use strict’;

var isSymbol = require(‘./is-symbol’);

module.exports = function (value) {

if (!isSymbol(value)) throw new TypeError(value + " is not a symbol");
return value;

};

},{“./is-symbol”:67}],70:[function(require,module,exports){ ‘use strict’;

module.exports = require(‘./is-implemented’)() ? WeakMap : require(‘./polyfill’);

},{“./is-implemented”:71,“./polyfill”:73}],71:[function(require,module,exports){ ‘use strict’;

module.exports = function () {

var weakMap, x;
if (typeof WeakMap !== 'function') return false;
try {
        // WebKit doesn't support arguments and crashes
        weakMap = new WeakMap([[x = {}, 'one'], [{}, 'two'], [{}, 'three']]);
} catch (e) {
        return false;
}
if (String(weakMap) !== '[object WeakMap]') return false;
if (typeof weakMap.set !== 'function') return false;
if (weakMap.set({}, 1) !== weakMap) return false;
if (typeof weakMap.delete !== 'function') return false;
if (typeof weakMap.has !== 'function') return false;
if (weakMap.get(x) !== 'one') return false;

return true;

};

},{}],72:[function(require,module,exports){ // Exports true if environment provides native ‘WeakMap` implementation, whatever that is.

‘use strict’;

module.exports = (function () {

if (typeof WeakMap !== 'function') return false;
return (Object.prototype.toString.call(new WeakMap()) === '[object WeakMap]');

}());

},{}],73:[function(require,module,exports){ ‘use strict’;

var setPrototypeOf = require(‘es5-ext/object/set-prototype-of’)

, object            = require('es5-ext/object/valid-object')
, value             = require('es5-ext/object/valid-value')
, randomUniq        = require('es5-ext/string/random-uniq')
, d                 = require('d')
, getIterator       = require('es6-iterator/get')
, forOf             = require('es6-iterator/for-of')
, toStringTagSymbol = require('es6-symbol').toStringTag
, isNative          = require('./is-native-implemented')

, isArray = Array.isArray, defineProperty = Object.defineProperty
, hasOwnProperty = Object.prototype.hasOwnProperty, getPrototypeOf = Object.getPrototypeOf
, WeakMapPoly;

module.exports = WeakMapPoly = function (/iterable/) {

var iterable = arguments[0], self;
if (!(this instanceof WeakMapPoly)) throw new TypeError('Constructor requires \'new\'');
if (isNative && setPrototypeOf && (WeakMap !== WeakMapPoly)) {
        self = setPrototypeOf(new WeakMap(), getPrototypeOf(this));
} else {
        self = this;
}
if (iterable != null) {
        if (!isArray(iterable)) iterable = getIterator(iterable);
}
defineProperty(self, '__weakMapData__', d('c', '$weakMap$' + randomUniq()));
if (!iterable) return self;
forOf(iterable, function (val) {
        value(val);
        self.set(val[0], val[1]);
});
return self;

};

if (isNative) {

if (setPrototypeOf) setPrototypeOf(WeakMapPoly, WeakMap);
WeakMapPoly.prototype = Object.create(WeakMap.prototype, {
        constructor: d(WeakMapPoly)
});

}

Object.defineProperties(WeakMapPoly.prototype, {

delete: d(function (key) {
        if (hasOwnProperty.call(object(key), this.__weakMapData__)) {
                delete key[this.__weakMapData__];
                return true;
        }
        return false;
}),
get: d(function (key) {
        if (hasOwnProperty.call(object(key), this.__weakMapData__)) {
                return key[this.__weakMapData__];
        }
}),
has: d(function (key) {
        return hasOwnProperty.call(object(key), this.__weakMapData__);
}),
set: d(function (key, value) {
        defineProperty(object(key), this.__weakMapData__, d('c', value));
        return this;
}),
toString: d(function () { return '[object WeakMap]'; })

}); defineProperty(WeakMapPoly.prototype, toStringTagSymbol, d(‘c’, ‘WeakMap’));

},{“./is-native-implemented”:72,“d”:7,“es5-ext/object/set-prototype-of”:41,“es5-ext/object/valid-object”:45,“es5-ext/object/valid-value”:46,“es5-ext/string/random-uniq”:51,“es6-iterator/for-of”:53,“es6-iterator/get”:54,“es6-symbol”:65}],74:[function(require,module,exports){ ‘use strict’;

Object.defineProperty(exports, “__esModule”, {

value: true

}); exports.Definition = exports.ParameterDefinition = undefined;

var _variable = require(‘./variable’);

var _variable2 = _interopRequireDefault(_variable);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

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; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(“Cannot call a class as a function”); } } /*

  Copyright (C) 2015 Yusuke Suzuki <utatane.tea@gmail.com>

  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 <COPYRIGHT HOLDER> 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.
*/

/**

* @class Definition
*/

var Definition = function Definition(type, name, node, parent, index, kind) {

_classCallCheck(this, Definition);

/**
 * @member {String} Definition#type - type of the occurrence (e.g. "Parameter", "Variable", ...).
 */
this.type = type;
/**
 * @member {esprima.Identifier} Definition#name - the identifier AST node of the occurrence.
 */
this.name = name;
/**
 * @member {esprima.Node} Definition#node - the enclosing node of the identifier.
 */
this.node = node;
/**
 * @member {esprima.Node?} Definition#parent - the enclosing statement node of the identifier.
 */
this.parent = parent;
/**
 * @member {Number?} Definition#index - the index in the declaration statement.
 */
this.index = index;
/**
 * @member {String?} Definition#kind - the kind of the declaration statement.
 */
this.kind = kind;

};

/**

* @class ParameterDefinition
*/

exports.default = Definition;

var ParameterDefinition = function (_Definition) {

_inherits(ParameterDefinition, _Definition);

function ParameterDefinition(name, node, index, rest) {
  _classCallCheck(this, ParameterDefinition);

  /**
   * Whether the parameter definition is a part of a rest parameter.
   * @member {boolean} ParameterDefinition#rest
   */

  var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(ParameterDefinition).call(this, _variable2.default.Parameter, name, node, null, index, null));

  _this.rest = rest;
  return _this;
}

return ParameterDefinition;

}(Definition);

exports.ParameterDefinition = ParameterDefinition; exports.Definition = Definition;

/* vim: set sw=4 ts=4 et tw=80 : */

},{“./variable”:81}],75:[function(require,module,exports){ ‘use strict’;

Object.defineProperty(exports, “__esModule”, {

value: true

}); exports.ScopeManager = exports.Scope = exports.Variable = exports.Reference = exports.version = undefined;

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; }; /*

  Copyright (C) 2012-2014 Yusuke Suzuki <utatane.tea@gmail.com>
  Copyright (C) 2013 Alex Seville <hi@alexanderseville.com>
  Copyright (C) 2014 Thiago de Arruda <tpadilha84@gmail.com>

  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 <COPYRIGHT HOLDER> 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.
*/

/**

* Escope (<a href="http://github.com/estools/escope">escope</a>) is an <a
* href="http://www.ecma-international.org/publications/standards/Ecma-262.htm">ECMAScript</a>
* scope analyzer extracted from the <a
* href="http://github.com/estools/esmangle">esmangle project</a/>.
* <p>
* <em>escope</em> finds lexical scopes in a source program, i.e. areas of that
* program where different occurrences of the same identifier refer to the same
* variable. With each scope the contained variables are collected, and each
* identifier reference in code is linked to its corresponding variable (if
* possible).
* <p>
* <em>escope</em> works on a syntax tree of the parsed source code which has
* to adhere to the <a
* href="https://developer.mozilla.org/en-US/docs/SpiderMonkey/Parser_API">
* Mozilla Parser API</a>. E.g. <a href="http://esprima.org">esprima</a> is a parser
* that produces such syntax trees.
* <p>
* The main interface is the {@link analyze} function.
* @module escope
*/

/*jslint bitwise:true */

exports.analyze = analyze;

var _assert = require(‘assert’);

var _assert2 = _interopRequireDefault(_assert);

var _scopeManager = require(‘./scope-manager’);

var _scopeManager2 = _interopRequireDefault(_scopeManager);

var _referencer = require(‘./referencer’);

var _referencer2 = _interopRequireDefault(_referencer);

var _reference = require(‘./reference’);

var _reference2 = _interopRequireDefault(_reference);

var _variable = require(‘./variable’);

var _variable2 = _interopRequireDefault(_variable);

var _scope = require(‘./scope’);

var _scope2 = _interopRequireDefault(_scope);

var _package = require(‘../package.json’);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function defaultOptions() {

return {
    optimistic: false,
    directive: false,
    nodejsScope: false,
    impliedStrict: false,
    sourceType: 'script', // one of ['script', 'module']
    ecmaVersion: 5,
    childVisitorKeys: null,
    fallback: 'iteration'
};

}

function updateDeeply(target, override) {

var key, val;

function isHashObject(target) {
    return (typeof target === 'undefined' ? 'undefined' : _typeof(target)) === 'object' && target instanceof Object && !(target instanceof Array) && !(target instanceof RegExp);
}

for (key in override) {
    if (override.hasOwnProperty(key)) {
        val = override[key];
        if (isHashObject(val)) {
            if (isHashObject(target[key])) {
                updateDeeply(target[key], val);
            } else {
                target[key] = updateDeeply({}, val);
            }
        } else {
            target[key] = val;
        }
    }
}
return target;

}

/**

* Main interface function. Takes an Esprima syntax tree and returns the
* analyzed scopes.
* @function analyze
* @param {esprima.Tree} tree
* @param {Object} providedOptions - Options that tailor the scope analysis
* @param {boolean} [providedOptions.optimistic=false] - the optimistic flag
* @param {boolean} [providedOptions.directive=false]- the directive flag
* @param {boolean} [providedOptions.ignoreEval=false]- whether to check 'eval()' calls
* @param {boolean} [providedOptions.nodejsScope=false]- whether the whole
* script is executed under node.js environment. When enabled, escope adds
* a function scope immediately following the global scope.
* @param {boolean} [providedOptions.impliedStrict=false]- implied strict mode
* (if ecmaVersion >= 5).
* @param {string} [providedOptions.sourceType='script']- the source type of the script. one of 'script' and 'module'
* @param {number} [providedOptions.ecmaVersion=5]- which ECMAScript version is considered
* @param {Object} [providedOptions.childVisitorKeys=null] - Additional known visitor keys. See [esrecurse](https://github.com/estools/esrecurse)'s the `childVisitorKeys` option.
* @param {string} [providedOptions.fallback='iteration'] - A kind of the fallback in order to encounter with unknown node. See [esrecurse](https://github.com/estools/esrecurse)'s the `fallback` option.
* @return {ScopeManager}
*/

function analyze(tree, providedOptions) {

var scopeManager, referencer, options;

options = updateDeeply(defaultOptions(), providedOptions);

scopeManager = new _scopeManager2.default(options);

referencer = new _referencer2.default(options, scopeManager);
referencer.visit(tree);

(0, _assert2.default)(scopeManager.__currentScope === null, 'currentScope should be null.');

return scopeManager;

}

exports. /** @name module:escope.version */ version = _package.version; exports. /** @name module:escope.Reference */ Reference = _reference2.default; exports. /** @name module:escope.Variable */ Variable = _variable2.default; exports. /** @name module:escope.Scope */ Scope = _scope2.default; exports. /** @name module:escope.ScopeManager */ ScopeManager = _scopeManager2.default;

/* vim: set sw=4 ts=4 et tw=80 : */

},{“../package.json”:82,“./reference”:77,“./referencer”:78,“./scope”:80,“./scope-manager”:79,“./variable”:81,“assert”:5}],76:[function(require,module,exports){ ‘use strict’;

Object.defineProperty(exports, “__esModule”, {

value: true

});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props; 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 _estraverse = require(‘estraverse’);

var _esrecurse = require(‘esrecurse’);

var _esrecurse2 = _interopRequireDefault(_esrecurse);

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; } /*

  Copyright (C) 2015 Yusuke Suzuki <utatane.tea@gmail.com>

  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 <COPYRIGHT HOLDER> BE LIABLE FOR ANY
  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

function getLast(xs) {

return xs[xs.length - 1] || null;

}

var PatternVisitor = function (_esrecurse$Visitor) {

_inherits(PatternVisitor, _esrecurse$Visitor);

_createClass(PatternVisitor, null, [{
    key: 'isPattern',
    value: function isPattern(node) {
        var nodeType = node.type;
        return nodeType === _estraverse.Syntax.Identifier || nodeType === _estraverse.Syntax.ObjectPattern || nodeType === _estraverse.Syntax.ArrayPattern || nodeType === _estraverse.Syntax.SpreadElement || nodeType === _estraverse.Syntax.RestElement || nodeType === _estraverse.Syntax.AssignmentPattern;
    }
}]);

function PatternVisitor(options, rootPattern, callback) {
    _classCallCheck(this, PatternVisitor);

    var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(PatternVisitor).call(this, null, options));

    _this.rootPattern = rootPattern;
    _this.callback = callback;
    _this.assignments = [];
    _this.rightHandNodes = [];
    _this.restElements = [];
    return _this;
}

_createClass(PatternVisitor, [{
    key: 'Identifier',
    value: function Identifier(pattern) {
        var lastRestElement = getLast(this.restElements);
        this.callback(pattern, {
            topLevel: pattern === this.rootPattern,
            rest: lastRestElement != null && lastRestElement.argument === pattern,
            assignments: this.assignments
        });
    }
}, {
    key: 'Property',
    value: function Property(property) {
        // Computed property's key is a right hand node.
        if (property.computed) {
            this.rightHandNodes.push(property.key);
        }

        // If it's shorthand, its key is same as its value.
        // If it's shorthand and has its default value, its key is same as its value.left (the value is AssignmentPattern).
        // If it's not shorthand, the name of new variable is its value's.
        this.visit(property.value);
    }
}, {
    key: 'ArrayPattern',
    value: function ArrayPattern(pattern) {
        var i, iz, element;
        for (i = 0, iz = pattern.elements.length; i < iz; ++i) {
            element = pattern.elements[i];
            this.visit(element);
        }
    }
}, {
    key: 'AssignmentPattern',
    value: function AssignmentPattern(pattern) {
        this.assignments.push(pattern);
        this.visit(pattern.left);
        this.rightHandNodes.push(pattern.right);
        this.assignments.pop();
    }
}, {
    key: 'RestElement',
    value: function RestElement(pattern) {
        this.restElements.push(pattern);
        this.visit(pattern.argument);
        this.restElements.pop();
    }
}, {
    key: 'MemberExpression',
    value: function MemberExpression(node) {
        // Computed property's key is a right hand node.
        if (node.computed) {
            this.rightHandNodes.push(node.property);
        }
        // the object is only read, write to its property.
        this.rightHandNodes.push(node.object);
    }

    //
    // ForInStatement.left and AssignmentExpression.left are LeftHandSideExpression.
    // By spec, LeftHandSideExpression is Pattern or MemberExpression.
    //   (see also: https://github.com/estree/estree/pull/20#issuecomment-74584758)
    // But espree 2.0 and esprima 2.0 parse to ArrayExpression, ObjectExpression, etc...
    //

}, {
    key: 'SpreadElement',
    value: function SpreadElement(node) {
        this.visit(node.argument);
    }
}, {
    key: 'ArrayExpression',
    value: function ArrayExpression(node) {
        node.elements.forEach(this.visit, this);
    }
}, {
    key: 'AssignmentExpression',
    value: function AssignmentExpression(node) {
        this.assignments.push(node);
        this.visit(node.left);
        this.rightHandNodes.push(node.right);
        this.assignments.pop();
    }
}, {
    key: 'CallExpression',
    value: function CallExpression(node) {
        var _this2 = this;

        // arguments are right hand nodes.
        node.arguments.forEach(function (a) {
            _this2.rightHandNodes.push(a);
        });
        this.visit(node.callee);
    }
}]);

return PatternVisitor;

}(_esrecurse2.default.Visitor);

/* vim: set sw=4 ts=4 et tw=80 : */

exports.default = PatternVisitor;

},{“esrecurse”:83,“estraverse”:87}],77:[function(require,module,exports){ “use strict”;

Object.defineProperty(exports, “__esModule”, {

value: true

});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props; 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; }; }();

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(“Cannot call a class as a function”); } }

/*

Copyright (C) 2015 Yusuke Suzuki <utatane.tea@gmail.com>

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 <COPYRIGHT HOLDER> 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 READ = 0x1; var WRITE = 0x2; var RW = READ | WRITE;

/**

* A Reference represents a single occurrence of an identifier in code.
* @class Reference
*/

var Reference = function () {

function Reference(ident, scope, flag, writeExpr, maybeImplicitGlobal, partial, init) {
  _classCallCheck(this, Reference);

  /**
   * Identifier syntax node.
   * @member {esprima#Identifier} Reference#identifier
   */
  this.identifier = ident;
  /**
   * Reference to the enclosing Scope.
   * @member {Scope} Reference#from
   */
  this.from = scope;
  /**
   * Whether the reference comes from a dynamic scope (such as 'eval',
   * 'with', etc.), and may be trapped by dynamic scopes.
   * @member {boolean} Reference#tainted
   */
  this.tainted = false;
  /**
   * The variable this reference is resolved with.
   * @member {Variable} Reference#resolved
   */
  this.resolved = null;
  /**
   * The read-write mode of the reference. (Value is one of {@link
   * Reference.READ}, {@link Reference.RW}, {@link Reference.WRITE}).
   * @member {number} Reference#flag
   * @private
   */
  this.flag = flag;
  if (this.isWrite()) {
    /**
     * If reference is writeable, this is the tree being written to it.
     * @member {esprima#Node} Reference#writeExpr
     */
    this.writeExpr = writeExpr;
    /**
     * Whether the Reference might refer to a partial value of writeExpr.
     * @member {boolean} Reference#partial
     */
    this.partial = partial;
    /**
     * Whether the Reference is to write of initialization.
     * @member {boolean} Reference#init
     */
    this.init = init;
  }
  this.__maybeImplicitGlobal = maybeImplicitGlobal;
}

/**
 * Whether the reference is static.
 * @method Reference#isStatic
 * @return {boolean}
 */

_createClass(Reference, [{
  key: "isStatic",
  value: function isStatic() {
    return !this.tainted && this.resolved && this.resolved.scope.isStatic();
  }

  /**
   * Whether the reference is writeable.
   * @method Reference#isWrite
   * @return {boolean}
   */

}, {
  key: "isWrite",
  value: function isWrite() {
    return !!(this.flag & Reference.WRITE);
  }

  /**
   * Whether the reference is readable.
   * @method Reference#isRead
   * @return {boolean}
   */

}, {
  key: "isRead",
  value: function isRead() {
    return !!(this.flag & Reference.READ);
  }

  /**
   * Whether the reference is read-only.
   * @method Reference#isReadOnly
   * @return {boolean}
   */

}, {
  key: "isReadOnly",
  value: function isReadOnly() {
    return this.flag === Reference.READ;
  }

  /**
   * Whether the reference is write-only.
   * @method Reference#isWriteOnly
   * @return {boolean}
   */

}, {
  key: "isWriteOnly",
  value: function isWriteOnly() {
    return this.flag === Reference.WRITE;
  }

  /**
   * Whether the reference is read-write.
   * @method Reference#isReadWrite
   * @return {boolean}
   */

}, {
  key: "isReadWrite",
  value: function isReadWrite() {
    return this.flag === Reference.RW;
  }
}]);

return Reference;

}();

/**

* @constant Reference.READ
* @private
*/

exports.default = Reference; Reference.READ = READ; /**

* @constant Reference.WRITE
* @private
*/

Reference.WRITE = WRITE; /**

* @constant Reference.RW
* @private
*/

Reference.RW = RW;

/* vim: set sw=4 ts=4 et tw=80 : */

},{}],78:[function(require,module,exports){ ‘use strict’;

Object.defineProperty(exports, “__esModule”, {

value: true

});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props; 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 _estraverse = require(‘estraverse’);

var _esrecurse = require(‘esrecurse’);

var _esrecurse2 = _interopRequireDefault(_esrecurse);

var _reference = require(‘./reference’);

var _reference2 = _interopRequireDefault(_reference);

var _variable = require(‘./variable’);

var _variable2 = _interopRequireDefault(_variable);

var _patternVisitor = require(‘./pattern-visitor’);

var _patternVisitor2 = _interopRequireDefault(_patternVisitor);

var _definition = require(‘./definition’);

var _assert = require(‘assert’);

var _assert2 = _interopRequireDefault(_assert);

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; } /*

  Copyright (C) 2015 Yusuke Suzuki <utatane.tea@gmail.com>

  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 <COPYRIGHT HOLDER> BE LIABLE FOR ANY
  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

function traverseIdentifierInPattern(options, rootPattern, referencer, callback) {

// Call the callback at left hand identifier nodes, and Collect right hand nodes.
var visitor = new _patternVisitor2.default(options, rootPattern, callback);
visitor.visit(rootPattern);

// Process the right hand nodes recursively.
if (referencer != null) {
    visitor.rightHandNodes.forEach(referencer.visit, referencer);
}

}

// Importing ImportDeclaration. // people.mozilla.org/~jorendorff/es6-draft.html#sec-moduledeclarationinstantiation // github.com/estree/estree/blob/master/es6.md#importdeclaration // FIXME: Now, we don’t create module environment, because the context is // implementation dependent.

var Importer = function (_esrecurse$Visitor) {

_inherits(Importer, _esrecurse$Visitor);

function Importer(declaration, referencer) {
    _classCallCheck(this, Importer);

    var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(Importer).call(this, null, referencer.options));

    _this.declaration = declaration;
    _this.referencer = referencer;
    return _this;
}

_createClass(Importer, [{
    key: 'visitImport',
    value: function visitImport(id, specifier) {
        var _this2 = this;

        this.referencer.visitPattern(id, function (pattern) {
            _this2.referencer.currentScope().__define(pattern, new _definition.Definition(_variable2.default.ImportBinding, pattern, specifier, _this2.declaration, null, null));
        });
    }
}, {
    key: 'ImportNamespaceSpecifier',
    value: function ImportNamespaceSpecifier(node) {
        var local = node.local || node.id;
        if (local) {
            this.visitImport(local, node);
        }
    }
}, {
    key: 'ImportDefaultSpecifier',
    value: function ImportDefaultSpecifier(node) {
        var local = node.local || node.id;
        this.visitImport(local, node);
    }
}, {
    key: 'ImportSpecifier',
    value: function ImportSpecifier(node) {
        var local = node.local || node.id;
        if (node.name) {
            this.visitImport(node.name, node);
        } else {
            this.visitImport(local, node);
        }
    }
}]);

return Importer;

}(_esrecurse2.default.Visitor);

// Referencing variables and creating bindings.

var Referencer = function (_esrecurse$Visitor2) {

_inherits(Referencer, _esrecurse$Visitor2);

function Referencer(options, scopeManager) {
    _classCallCheck(this, Referencer);

    var _this3 = _possibleConstructorReturn(this, Object.getPrototypeOf(Referencer).call(this, null, options));

    _this3.options = options;
    _this3.scopeManager = scopeManager;
    _this3.parent = null;
    _this3.isInnerMethodDefinition = false;
    return _this3;
}

_createClass(Referencer, [{
    key: 'currentScope',
    value: function currentScope() {
        return this.scopeManager.__currentScope;
    }
}, {
    key: 'close',
    value: function close(node) {
        while (this.currentScope() && node === this.currentScope().block) {
            this.scopeManager.__currentScope = this.currentScope().__close(this.scopeManager);
        }
    }
}, {
    key: 'pushInnerMethodDefinition',
    value: function pushInnerMethodDefinition(isInnerMethodDefinition) {
        var previous = this.isInnerMethodDefinition;
        this.isInnerMethodDefinition = isInnerMethodDefinition;
        return previous;
    }
}, {
    key: 'popInnerMethodDefinition',
    value: function popInnerMethodDefinition(isInnerMethodDefinition) {
        this.isInnerMethodDefinition = isInnerMethodDefinition;
    }
}, {
    key: 'materializeTDZScope',
    value: function materializeTDZScope(node, iterationNode) {
        // http://people.mozilla.org/~jorendorff/es6-draft.html#sec-runtime-semantics-forin-div-ofexpressionevaluation-abstract-operation
        // TDZ scope hides the declaration's names.
        this.scopeManager.__nestTDZScope(node, iterationNode);
        this.visitVariableDeclaration(this.currentScope(), _variable2.default.TDZ, iterationNode.left, 0, true);
    }
}, {
    key: 'materializeIterationScope',
    value: function materializeIterationScope(node) {
        var _this4 = this;

        // Generate iteration scope for upper ForIn/ForOf Statements.
        var letOrConstDecl;
        this.scopeManager.__nestForScope(node);
        letOrConstDecl = node.left;
        this.visitVariableDeclaration(this.currentScope(), _variable2.default.Variable, letOrConstDecl, 0);
        this.visitPattern(letOrConstDecl.declarations[0].id, function (pattern) {
            _this4.currentScope().__referencing(pattern, _reference2.default.WRITE, node.right, null, true, true);
        });
    }
}, {
    key: 'referencingDefaultValue',
    value: function referencingDefaultValue(pattern, assignments, maybeImplicitGlobal, init) {
        var scope = this.currentScope();
        assignments.forEach(function (assignment) {
            scope.__referencing(pattern, _reference2.default.WRITE, assignment.right, maybeImplicitGlobal, pattern !== assignment.left, init);
        });
    }
}, {
    key: 'visitPattern',
    value: function visitPattern(node, options, callback) {
        if (typeof options === 'function') {
            callback = options;
            options = { processRightHandNodes: false };
        }
        traverseIdentifierInPattern(this.options, node, options.processRightHandNodes ? this : null, callback);
    }
}, {
    key: 'visitFunction',
    value: function visitFunction(node) {
        var _this5 = this;

        var i, iz;
        // FunctionDeclaration name is defined in upper scope
        // NOTE: Not referring variableScope. It is intended.
        // Since
        //  in ES5, FunctionDeclaration should be in FunctionBody.
        //  in ES6, FunctionDeclaration should be block scoped.
        if (node.type === _estraverse.Syntax.FunctionDeclaration) {
            // id is defined in upper scope
            this.currentScope().__define(node.id, new _definition.Definition(_variable2.default.FunctionName, node.id, node, null, null, null));
        }

        // FunctionExpression with name creates its special scope;
        // FunctionExpressionNameScope.
        if (node.type === _estraverse.Syntax.FunctionExpression && node.id) {
            this.scopeManager.__nestFunctionExpressionNameScope(node);
        }

        // Consider this function is in the MethodDefinition.
        this.scopeManager.__nestFunctionScope(node, this.isInnerMethodDefinition);

        // Process parameter declarations.
        for (i = 0, iz = node.params.length; i < iz; ++i) {
            this.visitPattern(node.params[i], { processRightHandNodes: true }, function (pattern, info) {
                _this5.currentScope().__define(pattern, new _definition.ParameterDefinition(pattern, node, i, info.rest));

                _this5.referencingDefaultValue(pattern, info.assignments, null, true);
            });
        }

        // if there's a rest argument, add that
        if (node.rest) {
            this.visitPattern({
                type: 'RestElement',
                argument: node.rest
            }, function (pattern) {
                _this5.currentScope().__define(pattern, new _definition.ParameterDefinition(pattern, node, node.params.length, true));
            });
        }

        // Skip BlockStatement to prevent creating BlockStatement scope.
        if (node.body.type === _estraverse.Syntax.BlockStatement) {
            this.visitChildren(node.body);
        } else {
            this.visit(node.body);
        }

        this.close(node);
    }
}, {
    key: 'visitClass',
    value: function visitClass(node) {
        if (node.type === _estraverse.Syntax.ClassDeclaration) {
            this.currentScope().__define(node.id, new _definition.Definition(_variable2.default.ClassName, node.id, node, null, null, null));
        }

        // FIXME: Maybe consider TDZ.
        this.visit(node.superClass);

        this.scopeManager.__nestClassScope(node);

        if (node.id) {
            this.currentScope().__define(node.id, new _definition.Definition(_variable2.default.ClassName, node.id, node));
        }
        this.visit(node.body);

        this.close(node);
    }
}, {
    key: 'visitProperty',
    value: function visitProperty(node) {
        var previous, isMethodDefinition;
        if (node.computed) {
            this.visit(node.key);
        }

        isMethodDefinition = node.type === _estraverse.Syntax.MethodDefinition;
        if (isMethodDefinition) {
            previous = this.pushInnerMethodDefinition(true);
        }
        this.visit(node.value);
        if (isMethodDefinition) {
            this.popInnerMethodDefinition(previous);
        }
    }
}, {
    key: 'visitForIn',
    value: function visitForIn(node) {
        var _this6 = this;

        if (node.left.type === _estraverse.Syntax.VariableDeclaration && node.left.kind !== 'var') {
            this.materializeTDZScope(node.right, node);
            this.visit(node.right);
            this.close(node.right);

            this.materializeIterationScope(node);
            this.visit(node.body);
            this.close(node);
        } else {
            if (node.left.type === _estraverse.Syntax.VariableDeclaration) {
                this.visit(node.left);
                this.visitPattern(node.left.declarations[0].id, function (pattern) {
                    _this6.currentScope().__referencing(pattern, _reference2.default.WRITE, node.right, null, true, true);
                });
            } else {
                this.visitPattern(node.left, { processRightHandNodes: true }, function (pattern, info) {
                    var maybeImplicitGlobal = null;
                    if (!_this6.currentScope().isStrict) {
                        maybeImplicitGlobal = {
                            pattern: pattern,
                            node: node
                        };
                    }
                    _this6.referencingDefaultValue(pattern, info.assignments, maybeImplicitGlobal, false);
                    _this6.currentScope().__referencing(pattern, _reference2.default.WRITE, node.right, maybeImplicitGlobal, true, false);
                });
            }
            this.visit(node.right);
            this.visit(node.body);
        }
    }
}, {
    key: 'visitVariableDeclaration',
    value: function visitVariableDeclaration(variableTargetScope, type, node, index, fromTDZ) {
        var _this7 = this;

        // If this was called to initialize a TDZ scope, this needs to make definitions, but doesn't make references.
        var decl, init;

        decl = node.declarations[index];
        init = decl.init;
        this.visitPattern(decl.id, { processRightHandNodes: !fromTDZ }, function (pattern, info) {
            variableTargetScope.__define(pattern, new _definition.Definition(type, pattern, decl, node, index, node.kind));

            if (!fromTDZ) {
                _this7.referencingDefaultValue(pattern, info.assignments, null, true);
            }
            if (init) {
                _this7.currentScope().__referencing(pattern, _reference2.default.WRITE, init, null, !info.topLevel, true);
            }
        });
    }
}, {
    key: 'AssignmentExpression',
    value: function AssignmentExpression(node) {
        var _this8 = this;

        if (_patternVisitor2.default.isPattern(node.left)) {
            if (node.operator === '=') {
                this.visitPattern(node.left, { processRightHandNodes: true }, function (pattern, info) {
                    var maybeImplicitGlobal = null;
                    if (!_this8.currentScope().isStrict) {
                        maybeImplicitGlobal = {
                            pattern: pattern,
                            node: node
                        };
                    }
                    _this8.referencingDefaultValue(pattern, info.assignments, maybeImplicitGlobal, false);
                    _this8.currentScope().__referencing(pattern, _reference2.default.WRITE, node.right, maybeImplicitGlobal, !info.topLevel, false);
                });
            } else {
                this.currentScope().__referencing(node.left, _reference2.default.RW, node.right);
            }
        } else {
            this.visit(node.left);
        }
        this.visit(node.right);
    }
}, {
    key: 'CatchClause',
    value: function CatchClause(node) {
        var _this9 = this;

        this.scopeManager.__nestCatchScope(node);

        this.visitPattern(node.param, { processRightHandNodes: true }, function (pattern, info) {
            _this9.currentScope().__define(pattern, new _definition.Definition(_variable2.default.CatchClause, node.param, node, null, null, null));
            _this9.referencingDefaultValue(pattern, info.assignments, null, true);
        });
        this.visit(node.body);

        this.close(node);
    }
}, {
    key: 'Program',
    value: function Program(node) {
        this.scopeManager.__nestGlobalScope(node);

        if (this.scopeManager.__isNodejsScope()) {
            // Force strictness of GlobalScope to false when using node.js scope.
            this.currentScope().isStrict = false;
            this.scopeManager.__nestFunctionScope(node, false);
        }

        if (this.scopeManager.__isES6() && this.scopeManager.isModule()) {
            this.scopeManager.__nestModuleScope(node);
        }

        if (this.scopeManager.isStrictModeSupported() && this.scopeManager.isImpliedStrict()) {
            this.currentScope().isStrict = true;
        }

        this.visitChildren(node);
        this.close(node);
    }
}, {
    key: 'Identifier',
    value: function Identifier(node) {
        this.currentScope().__referencing(node);
    }
}, {
    key: 'UpdateExpression',
    value: function UpdateExpression(node) {
        if (_patternVisitor2.default.isPattern(node.argument)) {
            this.currentScope().__referencing(node.argument, _reference2.default.RW, null);
        } else {
            this.visitChildren(node);
        }
    }
}, {
    key: 'MemberExpression',
    value: function MemberExpression(node) {
        this.visit(node.object);
        if (node.computed) {
            this.visit(node.property);
        }
    }
}, {
    key: 'Property',
    value: function Property(node) {
        this.visitProperty(node);
    }
}, {
    key: 'MethodDefinition',
    value: function MethodDefinition(node) {
        this.visitProperty(node);
    }
}, {
    key: 'BreakStatement',
    value: function BreakStatement() {}
}, {
    key: 'ContinueStatement',
    value: function ContinueStatement() {}
}, {
    key: 'LabeledStatement',
    value: function LabeledStatement(node) {
        this.visit(node.body);
    }
}, {
    key: 'ForStatement',
    value: function ForStatement(node) {
        // Create ForStatement declaration.
        // NOTE: In ES6, ForStatement dynamically generates
        // per iteration environment. However, escope is
        // a static analyzer, we only generate one scope for ForStatement.
        if (node.init && node.init.type === _estraverse.Syntax.VariableDeclaration && node.init.kind !== 'var') {
            this.scopeManager.__nestForScope(node);
        }

        this.visitChildren(node);

        this.close(node);
    }
}, {
    key: 'ClassExpression',
    value: function ClassExpression(node) {
        this.visitClass(node);
    }
}, {
    key: 'ClassDeclaration',
    value: function ClassDeclaration(node) {
        this.visitClass(node);
    }
}, {
    key: 'CallExpression',
    value: function CallExpression(node) {
        // Check this is direct call to eval
        if (!this.scopeManager.__ignoreEval() && node.callee.type === _estraverse.Syntax.Identifier && node.callee.name === 'eval') {
            // NOTE: This should be `variableScope`. Since direct eval call always creates Lexical environment and
            // let / const should be enclosed into it. Only VariableDeclaration affects on the caller's environment.
            this.currentScope().variableScope.__detectEval();
        }
        this.visitChildren(node);
    }
}, {
    key: 'BlockStatement',
    value: function BlockStatement(node) {
        if (this.scopeManager.__isES6()) {
            this.scopeManager.__nestBlockScope(node);
        }

        this.visitChildren(node);

        this.close(node);
    }
}, {
    key: 'ThisExpression',
    value: function ThisExpression() {
        this.currentScope().variableScope.__detectThis();
    }
}, {
    key: 'WithStatement',
    value: function WithStatement(node) {
        this.visit(node.object);
        // Then nest scope for WithStatement.
        this.scopeManager.__nestWithScope(node);

        this.visit(node.body);

        this.close(node);
    }
}, {
    key: 'VariableDeclaration',
    value: function VariableDeclaration(node) {
        var variableTargetScope, i, iz, decl;
        variableTargetScope = node.kind === 'var' ? this.currentScope().variableScope : this.currentScope();
        for (i = 0, iz = node.declarations.length; i < iz; ++i) {
            decl = node.declarations[i];
            this.visitVariableDeclaration(variableTargetScope, _variable2.default.Variable, node, i);
            if (decl.init) {
                this.visit(decl.init);
            }
        }
    }

    // sec 13.11.8

}, {
    key: 'SwitchStatement',
    value: function SwitchStatement(node) {
        var i, iz;

        this.visit(node.discriminant);

        if (this.scopeManager.__isES6()) {
            this.scopeManager.__nestSwitchScope(node);
        }

        for (i = 0, iz = node.cases.length; i < iz; ++i) {
            this.visit(node.cases[i]);
        }

        this.close(node);
    }
}, {
    key: 'FunctionDeclaration',
    value: function FunctionDeclaration(node) {
        this.visitFunction(node);
    }
}, {
    key: 'FunctionExpression',
    value: function FunctionExpression(node) {
        this.visitFunction(node);
    }
}, {
    key: 'ForOfStatement',
    value: function ForOfStatement(node) {
        this.visitForIn(node);
    }
}, {
    key: 'ForInStatement',
    value: function ForInStatement(node) {
        this.visitForIn(node);
    }
}, {
    key: 'ArrowFunctionExpression',
    value: function ArrowFunctionExpression(node) {
        this.visitFunction(node);
    }
}, {
    key: 'ImportDeclaration',
    value: function ImportDeclaration(node) {
        var importer;

        (0, _assert2.default)(this.scopeManager.__isES6() && this.scopeManager.isModule(), 'ImportDeclaration should appear when the mode is ES6 and in the module context.');

        importer = new Importer(node, this);
        importer.visit(node);
    }
}, {
    key: 'visitExportDeclaration',
    value: function visitExportDeclaration(node) {
        if (node.source) {
            return;
        }
        if (node.declaration) {
            this.visit(node.declaration);
            return;
        }

        this.visitChildren(node);
    }
}, {
    key: 'ExportDeclaration',
    value: function ExportDeclaration(node) {
        this.visitExportDeclaration(node);
    }
}, {
    key: 'ExportNamedDeclaration',
    value: function ExportNamedDeclaration(node) {
        this.visitExportDeclaration(node);
    }
}, {
    key: 'ExportSpecifier',
    value: function ExportSpecifier(node) {
        var local = node.id || node.local;
        this.visit(local);
    }
}, {
    key: 'MetaProperty',
    value: function MetaProperty() {
        // do nothing.
    }
}]);

return Referencer;

}(_esrecurse2.default.Visitor);

/* vim: set sw=4 ts=4 et tw=80 : */

exports.default = Referencer;

},{“./definition”:74,“./pattern-visitor”:76,“./reference”:77,“./variable”:81,“assert”:5,“esrecurse”:83,“estraverse”:87}],79:[function(require,module,exports){ ‘use strict’;

Object.defineProperty(exports, “__esModule”, {

value: true

});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props; 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; }; }(); /*

  Copyright (C) 2015 Yusuke Suzuki <utatane.tea@gmail.com>

  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 <COPYRIGHT HOLDER> 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 _es6WeakMap = require(‘es6-weak-map’);

var _es6WeakMap2 = _interopRequireDefault(_es6WeakMap);

var _scope = require(‘./scope’);

var _scope2 = _interopRequireDefault(_scope);

var _assert = require(‘assert’);

var _assert2 = _interopRequireDefault(_assert);

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”); } }

/**

* @class ScopeManager
*/

var ScopeManager = function () {

function ScopeManager(options) {
    _classCallCheck(this, ScopeManager);

    this.scopes = [];
    this.globalScope = null;
    this.__nodeToScope = new _es6WeakMap2.default();
    this.__currentScope = null;
    this.__options = options;
    this.__declaredVariables = new _es6WeakMap2.default();
}

_createClass(ScopeManager, [{
    key: '__useDirective',
    value: function __useDirective() {
        return this.__options.directive;
    }
}, {
    key: '__isOptimistic',
    value: function __isOptimistic() {
        return this.__options.optimistic;
    }
}, {
    key: '__ignoreEval',
    value: function __ignoreEval() {
        return this.__options.ignoreEval;
    }
}, {
    key: '__isNodejsScope',
    value: function __isNodejsScope() {
        return this.__options.nodejsScope;
    }
}, {
    key: 'isModule',
    value: function isModule() {
        return this.__options.sourceType === 'module';
    }
}, {
    key: 'isImpliedStrict',
    value: function isImpliedStrict() {
        return this.__options.impliedStrict;
    }
}, {
    key: 'isStrictModeSupported',
    value: function isStrictModeSupported() {
        return this.__options.ecmaVersion >= 5;
    }

    // Returns appropriate scope for this node.

}, {
    key: '__get',
    value: function __get(node) {
        return this.__nodeToScope.get(node);
    }

    /**
     * Get variables that are declared by the node.
     *
     * "are declared by the node" means the node is same as `Variable.defs[].node` or `Variable.defs[].parent`.
     * If the node declares nothing, this method returns an empty array.
     * CAUTION: This API is experimental. See https://github.com/estools/escope/pull/69 for more details.
     *
     * @param {Esprima.Node} node - a node to get.
     * @returns {Variable[]} variables that declared by the node.
     */

}, {
    key: 'getDeclaredVariables',
    value: function getDeclaredVariables(node) {
        return this.__declaredVariables.get(node) || [];
    }

    /**
     * acquire scope from node.
     * @method ScopeManager#acquire
     * @param {Esprima.Node} node - node for the acquired scope.
     * @param {boolean=} inner - look up the most inner scope, default value is false.
     * @return {Scope?}
     */

}, {
    key: 'acquire',
    value: function acquire(node, inner) {
        var scopes, scope, i, iz;

        function predicate(scope) {
            if (scope.type === 'function' && scope.functionExpressionScope) {
                return false;
            }
            if (scope.type === 'TDZ') {
                return false;
            }
            return true;
        }

        scopes = this.__get(node);
        if (!scopes || scopes.length === 0) {
            return null;
        }

        // Heuristic selection from all scopes.
        // If you would like to get all scopes, please use ScopeManager#acquireAll.
        if (scopes.length === 1) {
            return scopes[0];
        }

        if (inner) {
            for (i = scopes.length - 1; i >= 0; --i) {
                scope = scopes[i];
                if (predicate(scope)) {
                    return scope;
                }
            }
        } else {
            for (i = 0, iz = scopes.length; i < iz; ++i) {
                scope = scopes[i];
                if (predicate(scope)) {
                    return scope;
                }
            }
        }

        return null;
    }

    /**
     * acquire all scopes from node.
     * @method ScopeManager#acquireAll
     * @param {Esprima.Node} node - node for the acquired scope.
     * @return {Scope[]?}
     */

}, {
    key: 'acquireAll',
    value: function acquireAll(node) {
        return this.__get(node);
    }

    /**
     * release the node.
     * @method ScopeManager#release
     * @param {Esprima.Node} node - releasing node.
     * @param {boolean=} inner - look up the most inner scope, default value is false.
     * @return {Scope?} upper scope for the node.
     */

}, {
    key: 'release',
    value: function release(node, inner) {
        var scopes, scope;
        scopes = this.__get(node);
        if (scopes && scopes.length) {
            scope = scopes[0].upper;
            if (!scope) {
                return null;
            }
            return this.acquire(scope.block, inner);
        }
        return null;
    }
}, {
    key: 'attach',
    value: function attach() {}
}, {
    key: 'detach',
    value: function detach() {}
}, {
    key: '__nestScope',
    value: function __nestScope(scope) {
        if (scope instanceof _scope.GlobalScope) {
            (0, _assert2.default)(this.__currentScope === null);
            this.globalScope = scope;
        }
        this.__currentScope = scope;
        return scope;
    }
}, {
    key: '__nestGlobalScope',
    value: function __nestGlobalScope(node) {
        return this.__nestScope(new _scope.GlobalScope(this, node));
    }
}, {
    key: '__nestBlockScope',
    value: function __nestBlockScope(node, isMethodDefinition) {
        return this.__nestScope(new _scope.BlockScope(this, this.__currentScope, node));
    }
}, {
    key: '__nestFunctionScope',
    value: function __nestFunctionScope(node, isMethodDefinition) {
        return this.__nestScope(new _scope.FunctionScope(this, this.__currentScope, node, isMethodDefinition));
    }
}, {
    key: '__nestForScope',
    value: function __nestForScope(node) {
        return this.__nestScope(new _scope.ForScope(this, this.__currentScope, node));
    }
}, {
    key: '__nestCatchScope',
    value: function __nestCatchScope(node) {
        return this.__nestScope(new _scope.CatchScope(this, this.__currentScope, node));
    }
}, {
    key: '__nestWithScope',
    value: function __nestWithScope(node) {
        return this.__nestScope(new _scope.WithScope(this, this.__currentScope, node));
    }
}, {
    key: '__nestClassScope',
    value: function __nestClassScope(node) {
        return this.__nestScope(new _scope.ClassScope(this, this.__currentScope, node));
    }
}, {
    key: '__nestSwitchScope',
    value: function __nestSwitchScope(node) {
        return this.__nestScope(new _scope.SwitchScope(this, this.__currentScope, node));
    }
}, {
    key: '__nestModuleScope',
    value: function __nestModuleScope(node) {
        return this.__nestScope(new _scope.ModuleScope(this, this.__currentScope, node));
    }
}, {
    key: '__nestTDZScope',
    value: function __nestTDZScope(node) {
        return this.__nestScope(new _scope.TDZScope(this, this.__currentScope, node));
    }
}, {
    key: '__nestFunctionExpressionNameScope',
    value: function __nestFunctionExpressionNameScope(node) {
        return this.__nestScope(new _scope.FunctionExpressionNameScope(this, this.__currentScope, node));
    }
}, {
    key: '__isES6',
    value: function __isES6() {
        return this.__options.ecmaVersion >= 6;
    }
}]);

return ScopeManager;

}();

/* vim: set sw=4 ts=4 et tw=80 : */

exports.default = ScopeManager;

},{“./scope”:80,“assert”:5,“es6-weak-map”:70}],80:[function(require,module,exports){ ‘use strict’;

Object.defineProperty(exports, “__esModule”, {

value: true

}); exports.ClassScope = exports.ForScope = exports.FunctionScope = exports.SwitchScope = exports.BlockScope = exports.TDZScope = exports.WithScope = exports.CatchScope = exports.FunctionExpressionNameScope = exports.ModuleScope = exports.GlobalScope = undefined;

var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (“value” in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props; 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; }; }(); /*

  Copyright (C) 2015 Yusuke Suzuki <utatane.tea@gmail.com>

  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 <COPYRIGHT HOLDER> 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 _estraverse = require(‘estraverse’);

var _es6Map = require(‘es6-map’);

var _es6Map2 = _interopRequireDefault(_es6Map);

var _reference = require(‘./reference’);

var _reference2 = _interopRequireDefault(_reference);

var _variable = require(‘./variable’);

var _variable2 = _interopRequireDefault(_variable);

var _definition = require(‘./definition’);

var _definition2 = _interopRequireDefault(_definition);

var _assert = require(‘assert’);

var _assert2 = _interopRequireDefault(_assert);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

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; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(“Cannot call a class as a function”); } }

function isStrictScope(scope, block, isMethodDefinition, useDirective) {

var body, i, iz, stmt, expr;

// When upper scope is exists and strict, inner scope is also strict.
if (scope.upper && scope.upper.isStrict) {
    return true;
}

// ArrowFunctionExpression's scope is always strict scope.
if (block.type === _estraverse.Syntax.ArrowFunctionExpression) {
    return true;
}

if (isMethodDefinition) {
    return true;
}

if (scope.type === 'class' || scope.type === 'module') {
    return true;
}

if (scope.type === 'block' || scope.type === 'switch') {
    return false;
}

if (scope.type === 'function') {
    if (block.type === _estraverse.Syntax.Program) {
        body = block;
    } else {
        body = block.body;
    }
} else if (scope.type === 'global') {
    body = block;
} else {
    return false;
}

// Search 'use strict' directive.
if (useDirective) {
    for (i = 0, iz = body.body.length; i < iz; ++i) {
        stmt = body.body[i];
        if (stmt.type !== _estraverse.Syntax.DirectiveStatement) {
            break;
        }
        if (stmt.raw === '"use strict"' || stmt.raw === '\'use strict\'') {
            return true;
        }
    }
} else {
    for (i = 0, iz = body.body.length; i < iz; ++i) {
        stmt = body.body[i];
        if (stmt.type !== _estraverse.Syntax.ExpressionStatement) {
            break;
        }
        expr = stmt.expression;
        if (expr.type !== _estraverse.Syntax.Literal || typeof expr.value !== 'string') {
            break;
        }
        if (expr.raw != null) {
            if (expr.raw === '"use strict"' || expr.raw === '\'use strict\'') {
                return true;
            }
        } else {
            if (expr.value === 'use strict') {
                return true;
            }
        }
    }
}
return false;

}

function registerScope(scopeManager, scope) {

var scopes;

scopeManager.scopes.push(scope);

scopes = scopeManager.__nodeToScope.get(scope.block);
if (scopes) {
    scopes.push(scope);
} else {
    scopeManager.__nodeToScope.set(scope.block, [scope]);
}

}

function shouldBeStatically(def) {

return def.type === _variable2.default.ClassName || def.type === _variable2.default.Variable && def.parent.kind !== 'var';

}

/**

* @class Scope
*/

var Scope = function () {

function Scope(scopeManager, type, upperScope, block, isMethodDefinition) {
    _classCallCheck(this, Scope);

    /**
     * One of 'TDZ', 'module', 'block', 'switch', 'function', 'catch', 'with', 'function', 'class', 'global'.
     * @member {String} Scope#type
     */
    this.type = type;
    /**
    * The scoped {@link Variable}s of this scope, as <code>{ Variable.name
    * : Variable }</code>.
    * @member {Map} Scope#set
    */
    this.set = new _es6Map2.default();
    /**
     * The tainted variables of this scope, as <code>{ Variable.name :
     * boolean }</code>.
     * @member {Map} Scope#taints */
    this.taints = new _es6Map2.default();
    /**
     * Generally, through the lexical scoping of JS you can always know
     * which variable an identifier in the source code refers to. There are
     * a few exceptions to this rule. With 'global' and 'with' scopes you
     * can only decide at runtime which variable a reference refers to.
     * Moreover, if 'eval()' is used in a scope, it might introduce new
     * bindings in this or its parent scopes.
     * All those scopes are considered 'dynamic'.
     * @member {boolean} Scope#dynamic
     */
    this.dynamic = this.type === 'global' || this.type === 'with';
    /**
     * A reference to the scope-defining syntax node.
     * @member {esprima.Node} Scope#block
     */
    this.block = block;
    /**
    * The {@link Reference|references} that are not resolved with this scope.
    * @member {Reference[]} Scope#through
    */
    this.through = [];
    /**
    * The scoped {@link Variable}s of this scope. In the case of a
    * 'function' scope this includes the automatic argument <em>arguments</em> as
    * its first element, as well as all further formal arguments.
    * @member {Variable[]} Scope#variables
    */
    this.variables = [];
    /**
    * Any variable {@link Reference|reference} found in this scope. This
    * includes occurrences of local variables as well as variables from
    * parent scopes (including the global scope). For local variables
    * this also includes defining occurrences (like in a 'var' statement).
    * In a 'function' scope this does not include the occurrences of the
    * formal parameter in the parameter list.
    * @member {Reference[]} Scope#references
    */
    this.references = [];

    /**
    * For 'global' and 'function' scopes, this is a self-reference. For
    * other scope types this is the <em>variableScope</em> value of the
    * parent scope.
    * @member {Scope} Scope#variableScope
    */
    this.variableScope = this.type === 'global' || this.type === 'function' || this.type === 'module' ? this : upperScope.variableScope;
    /**
    * Whether this scope is created by a FunctionExpression.
    * @member {boolean} Scope#functionExpressionScope
    */
    this.functionExpressionScope = false;
    /**
    * Whether this is a scope that contains an 'eval()' invocation.
    * @member {boolean} Scope#directCallToEvalScope
    */
    this.directCallToEvalScope = false;
    /**
    * @member {boolean} Scope#thisFound
    */
    this.thisFound = false;

    this.__left = [];

    /**
    * Reference to the parent {@link Scope|scope}.
    * @member {Scope} Scope#upper
    */
    this.upper = upperScope;
    /**
    * Whether 'use strict' is in effect in this scope.
    * @member {boolean} Scope#isStrict
    */
    this.isStrict = isStrictScope(this, block, isMethodDefinition, scopeManager.__useDirective());

    /**
    * List of nested {@link Scope}s.
    * @member {Scope[]} Scope#childScopes
    */
    this.childScopes = [];
    if (this.upper) {
        this.upper.childScopes.push(this);
    }

    this.__declaredVariables = scopeManager.__declaredVariables;

    registerScope(scopeManager, this);
}

_createClass(Scope, [{
    key: '__shouldStaticallyClose',
    value: function __shouldStaticallyClose(scopeManager) {
        return !this.dynamic || scopeManager.__isOptimistic();
    }
}, {
    key: '__shouldStaticallyCloseForGlobal',
    value: function __shouldStaticallyCloseForGlobal(ref) {
        // On global scope, let/const/class declarations should be resolved statically.
        var name = ref.identifier.name;
        if (!this.set.has(name)) {
            return false;
        }

        var variable = this.set.get(name);
        var defs = variable.defs;
        return defs.length > 0 && defs.every(shouldBeStatically);
    }
}, {
    key: '__staticCloseRef',
    value: function __staticCloseRef(ref) {
        if (!this.__resolve(ref)) {
            this.__delegateToUpperScope(ref);
        }
    }
}, {
    key: '__dynamicCloseRef',
    value: function __dynamicCloseRef(ref) {
        // notify all names are through to global
        var current = this;
        do {
            current.through.push(ref);
            current = current.upper;
        } while (current);
    }
}, {
    key: '__globalCloseRef',
    value: function __globalCloseRef(ref) {
        // let/const/class declarations should be resolved statically.
        // others should be resolved dynamically.
        if (this.__shouldStaticallyCloseForGlobal(ref)) {
            this.__staticCloseRef(ref);
        } else {
            this.__dynamicCloseRef(ref);
        }
    }
}, {
    key: '__close',
    value: function __close(scopeManager) {
        var closeRef;
        if (this.__shouldStaticallyClose(scopeManager)) {
            closeRef = this.__staticCloseRef;
        } else if (this.type !== 'global') {
            closeRef = this.__dynamicCloseRef;
        } else {
            closeRef = this.__globalCloseRef;
        }

        // Try Resolving all references in this scope.
        for (var i = 0, iz = this.__left.length; i < iz; ++i) {
            var ref = this.__left[i];
            closeRef.call(this, ref);
        }
        this.__left = null;

        return this.upper;
    }
}, {
    key: '__resolve',
    value: function __resolve(ref) {
        var variable, name;
        name = ref.identifier.name;
        if (this.set.has(name)) {
            variable = this.set.get(name);
            variable.references.push(ref);
            variable.stack = variable.stack && ref.from.variableScope === this.variableScope;
            if (ref.tainted) {
                variable.tainted = true;
                this.taints.set(variable.name, true);
            }
            ref.resolved = variable;
            return true;
        }
        return false;
    }
}, {
    key: '__delegateToUpperScope',
    value: function __delegateToUpperScope(ref) {
        if (this.upper) {
            this.upper.__left.push(ref);
        }
        this.through.push(ref);
    }
}, {
    key: '__addDeclaredVariablesOfNode',
    value: function __addDeclaredVariablesOfNode(variable, node) {
        if (node == null) {
            return;
        }

        var variables = this.__declaredVariables.get(node);
        if (variables == null) {
            variables = [];
            this.__declaredVariables.set(node, variables);
        }
        if (variables.indexOf(variable) === -1) {
            variables.push(variable);
        }
    }
}, {
    key: '__defineGeneric',
    value: function __defineGeneric(name, set, variables, node, def) {
        var variable;

        variable = set.get(name);
        if (!variable) {
            variable = new _variable2.default(name, this);
            set.set(name, variable);
            variables.push(variable);
        }

        if (def) {
            variable.defs.push(def);
            if (def.type !== _variable2.default.TDZ) {
                this.__addDeclaredVariablesOfNode(variable, def.node);
                this.__addDeclaredVariablesOfNode(variable, def.parent);
            }
        }
        if (node) {
            variable.identifiers.push(node);
        }
    }
}, {
    key: '__define',
    value: function __define(node, def) {
        if (node && node.type === _estraverse.Syntax.Identifier) {
            this.__defineGeneric(node.name, this.set, this.variables, node, def);
        }
    }
}, {
    key: '__referencing',
    value: function __referencing(node, assign, writeExpr, maybeImplicitGlobal, partial, init) {
        // because Array element may be null
        if (!node || node.type !== _estraverse.Syntax.Identifier) {
            return;
        }

        // Specially handle like `this`.
        if (node.name === 'super') {
            return;
        }

        var ref = new _reference2.default(node, this, assign || _reference2.default.READ, writeExpr, maybeImplicitGlobal, !!partial, !!init);
        this.references.push(ref);
        this.__left.push(ref);
    }
}, {
    key: '__detectEval',
    value: function __detectEval() {
        var current;
        current = this;
        this.directCallToEvalScope = true;
        do {
            current.dynamic = true;
            current = current.upper;
        } while (current);
    }
}, {
    key: '__detectThis',
    value: function __detectThis() {
        this.thisFound = true;
    }
}, {
    key: '__isClosed',
    value: function __isClosed() {
        return this.__left === null;
    }

    /**
     * returns resolved {Reference}
     * @method Scope#resolve
     * @param {Esprima.Identifier} ident - identifier to be resolved.
     * @return {Reference}
     */

}, {
    key: 'resolve',
    value: function resolve(ident) {
        var ref, i, iz;
        (0, _assert2.default)(this.__isClosed(), 'Scope should be closed.');
        (0, _assert2.default)(ident.type === _estraverse.Syntax.Identifier, 'Target should be identifier.');
        for (i = 0, iz = this.references.length; i < iz; ++i) {
            ref = this.references[i];
            if (ref.identifier === ident) {
                return ref;
            }
        }
        return null;
    }

    /**
     * returns this scope is static
     * @method Scope#isStatic
     * @return {boolean}
     */

}, {
    key: 'isStatic',
    value: function isStatic() {
        return !this.dynamic;
    }

    /**
     * returns this scope has materialized arguments
     * @method Scope#isArgumentsMaterialized
     * @return {boolean}
     */

}, {
    key: 'isArgumentsMaterialized',
    value: function isArgumentsMaterialized() {
        return true;
    }

    /**
     * returns this scope has materialized `this` reference
     * @method Scope#isThisMaterialized
     * @return {boolean}
     */

}, {
    key: 'isThisMaterialized',
    value: function isThisMaterialized() {
        return true;
    }
}, {
    key: 'isUsedName',
    value: function isUsedName(name) {
        if (this.set.has(name)) {
            return true;
        }
        for (var i = 0, iz = this.through.length; i < iz; ++i) {
            if (this.through[i].identifier.name === name) {
                return true;
            }
        }
        return false;
    }
}]);

return Scope;

}();

exports.default = Scope;

var GlobalScope = exports.GlobalScope = function (_Scope) {

_inherits(GlobalScope, _Scope);

function GlobalScope(scopeManager, block) {
    _classCallCheck(this, GlobalScope);

    var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(GlobalScope).call(this, scopeManager, 'global', null, block, false));

    _this.implicit = {
        set: new _es6Map2.default(),
        variables: [],
        /**
        * List of {@link Reference}s that are left to be resolved (i.e. which
        * need to be linked to the variable they refer to).
        * @member {Reference[]} Scope#implicit#left
        */
        left: []
    };
    return _this;
}

_createClass(GlobalScope, [{
    key: '__close',
    value: function __close(scopeManager) {
        var implicit = [];
        for (var i = 0, iz = this.__left.length; i < iz; ++i) {
            var ref = this.__left[i];
            if (ref.__maybeImplicitGlobal && !this.set.has(ref.identifier.name)) {
                implicit.push(ref.__maybeImplicitGlobal);
            }
        }

        // create an implicit global variable from assignment expression
        for (var _i = 0, _iz = implicit.length; _i < _iz; ++_i) {
            var info = implicit[_i];
            this.__defineImplicit(info.pattern, new _definition2.default(_variable2.default.ImplicitGlobalVariable, info.pattern, info.node, null, null, null));
        }

        this.implicit.left = this.__left;

        return _get(Object.getPrototypeOf(GlobalScope.prototype), '__close', this).call(this, scopeManager);
    }
}, {
    key: '__defineImplicit',
    value: function __defineImplicit(node, def) {
        if (node && node.type === _estraverse.Syntax.Identifier) {
            this.__defineGeneric(node.name, this.implicit.set, this.implicit.variables, node, def);
        }
    }
}]);

return GlobalScope;

}(Scope);

var ModuleScope = exports.ModuleScope = function (_Scope2) {

_inherits(ModuleScope, _Scope2);

function ModuleScope(scopeManager, upperScope, block) {
    _classCallCheck(this, ModuleScope);

    return _possibleConstructorReturn(this, Object.getPrototypeOf(ModuleScope).call(this, scopeManager, 'module', upperScope, block, false));
}

return ModuleScope;

}(Scope);

var FunctionExpressionNameScope = exports.FunctionExpressionNameScope = function (_Scope3) {

_inherits(FunctionExpressionNameScope, _Scope3);

function FunctionExpressionNameScope(scopeManager, upperScope, block) {
    _classCallCheck(this, FunctionExpressionNameScope);

    var _this3 = _possibleConstructorReturn(this, Object.getPrototypeOf(FunctionExpressionNameScope).call(this, scopeManager, 'function-expression-name', upperScope, block, false));

    _this3.__define(block.id, new _definition2.default(_variable2.default.FunctionName, block.id, block, null, null, null));
    _this3.functionExpressionScope = true;
    return _this3;
}

return FunctionExpressionNameScope;

}(Scope);

var CatchScope = exports.CatchScope = function (_Scope4) {

_inherits(CatchScope, _Scope4);

function CatchScope(scopeManager, upperScope, block) {
    _classCallCheck(this, CatchScope);

    return _possibleConstructorReturn(this, Object.getPrototypeOf(CatchScope).call(this, scopeManager, 'catch', upperScope, block, false));
}

return CatchScope;

}(Scope);

var WithScope = exports.WithScope = function (_Scope5) {

_inherits(WithScope, _Scope5);

function WithScope(scopeManager, upperScope, block) {
    _classCallCheck(this, WithScope);

    return _possibleConstructorReturn(this, Object.getPrototypeOf(WithScope).call(this, scopeManager, 'with', upperScope, block, false));
}

_createClass(WithScope, [{
    key: '__close',
    value: function __close(scopeManager) {
        if (this.__shouldStaticallyClose(scopeManager)) {
            return _get(Object.getPrototypeOf(WithScope.prototype), '__close', this).call(this, scopeManager);
        }

        for (var i = 0, iz = this.__left.length; i < iz; ++i) {
            var ref = this.__left[i];
            ref.tainted = true;
            this.__delegateToUpperScope(ref);
        }
        this.__left = null;

        return this.upper;
    }
}]);

return WithScope;

}(Scope);

var TDZScope = exports.TDZScope = function (_Scope6) {

_inherits(TDZScope, _Scope6);

function TDZScope(scopeManager, upperScope, block) {
    _classCallCheck(this, TDZScope);

    return _possibleConstructorReturn(this, Object.getPrototypeOf(TDZScope).call(this, scopeManager, 'TDZ', upperScope, block, false));
}

return TDZScope;

}(Scope);

var BlockScope = exports.BlockScope = function (_Scope7) {

_inherits(BlockScope, _Scope7);

function BlockScope(scopeManager, upperScope, block) {
    _classCallCheck(this, BlockScope);

    return _possibleConstructorReturn(this, Object.getPrototypeOf(BlockScope).call(this, scopeManager, 'block', upperScope, block, false));
}

return BlockScope;

}(Scope);

var SwitchScope = exports.SwitchScope = function (_Scope8) {

_inherits(SwitchScope, _Scope8);

function SwitchScope(scopeManager, upperScope, block) {
    _classCallCheck(this, SwitchScope);

    return _possibleConstructorReturn(this, Object.getPrototypeOf(SwitchScope).call(this, scopeManager, 'switch', upperScope, block, false));
}

return SwitchScope;

}(Scope);

var FunctionScope = exports.FunctionScope = function (_Scope9) {

_inherits(FunctionScope, _Scope9);

function FunctionScope(scopeManager, upperScope, block, isMethodDefinition) {
    _classCallCheck(this, FunctionScope);

    // section 9.2.13, FunctionDeclarationInstantiation.
    // NOTE Arrow functions never have an arguments objects.

    var _this9 = _possibleConstructorReturn(this, Object.getPrototypeOf(FunctionScope).call(this, scopeManager, 'function', upperScope, block, isMethodDefinition));

    if (_this9.block.type !== _estraverse.Syntax.ArrowFunctionExpression) {
        _this9.__defineArguments();
    }
    return _this9;
}

_createClass(FunctionScope, [{
    key: 'isArgumentsMaterialized',
    value: function isArgumentsMaterialized() {
        // TODO(Constellation)
        // We can more aggressive on this condition like this.
        //
        // function t() {
        //     // arguments of t is always hidden.
        //     function arguments() {
        //     }
        // }
        if (this.block.type === _estraverse.Syntax.ArrowFunctionExpression) {
            return false;
        }

        if (!this.isStatic()) {
            return true;
        }

        var variable = this.set.get('arguments');
        (0, _assert2.default)(variable, 'Always have arguments variable.');
        return variable.tainted || variable.references.length !== 0;
    }
}, {
    key: 'isThisMaterialized',
    value: function isThisMaterialized() {
        if (!this.isStatic()) {
            return true;
        }
        return this.thisFound;
    }
}, {
    key: '__defineArguments',
    value: function __defineArguments() {
        this.__defineGeneric('arguments', this.set, this.variables, null, null);
        this.taints.set('arguments', true);
    }
}]);

return FunctionScope;

}(Scope);

var ForScope = exports.ForScope = function (_Scope10) {

_inherits(ForScope, _Scope10);

function ForScope(scopeManager, upperScope, block) {
    _classCallCheck(this, ForScope);

    return _possibleConstructorReturn(this, Object.getPrototypeOf(ForScope).call(this, scopeManager, 'for', upperScope, block, false));
}

return ForScope;

}(Scope);

var ClassScope = exports.ClassScope = function (_Scope11) {

_inherits(ClassScope, _Scope11);

function ClassScope(scopeManager, upperScope, block) {
    _classCallCheck(this, ClassScope);

    return _possibleConstructorReturn(this, Object.getPrototypeOf(ClassScope).call(this, scopeManager, 'class', upperScope, block, false));
}

return ClassScope;

}(Scope);

/* vim: set sw=4 ts=4 et tw=80 : */

},{“./definition”:74,“./reference”:77,“./variable”:81,“assert”:5,“es6-map”:59,“estraverse”:87}],81:[function(require,module,exports){ ‘use strict’;

Object.defineProperty(exports, “__esModule”, {

value: true

});

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(“Cannot call a class as a function”); } }

/*

Copyright (C) 2015 Yusuke Suzuki <utatane.tea@gmail.com>

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 <COPYRIGHT HOLDER> 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.

*/

/**

* A Variable represents a locally scoped identifier. These include arguments to
* functions.
* @class Variable
*/

var Variable = function Variable(name, scope) {

_classCallCheck(this, Variable);

/**
 * The variable name, as given in the source code.
 * @member {String} Variable#name
 */
this.name = name;
/**
 * List of defining occurrences of this variable (like in 'var ...'
 * statements or as parameter), as AST nodes.
 * @member {esprima.Identifier[]} Variable#identifiers
 */
this.identifiers = [];
/**
 * List of {@link Reference|references} of this variable (excluding parameter entries)
 * in its defining scope and all nested scopes. For defining
 * occurrences only see {@link Variable#defs}.
 * @member {Reference[]} Variable#references
 */
this.references = [];

/**
 * List of defining occurrences of this variable (like in 'var ...'
 * statements or as parameter), as custom objects.
 * @member {Definition[]} Variable#defs
 */
this.defs = [];

this.tainted = false;
/**
 * Whether this is a stack variable.
 * @member {boolean} Variable#stack
 */
this.stack = true;
/**
 * Reference to the enclosing Scope.
 * @member {Scope} Variable#scope
 */
this.scope = scope;

};

exports.default = Variable;

Variable.CatchClause = ‘CatchClause’; Variable.Parameter = ‘Parameter’; Variable.FunctionName = ‘FunctionName’; Variable.ClassName = ‘ClassName’; Variable.Variable = ‘Variable’; Variable.ImportBinding = ‘ImportBinding’; Variable.TDZ = ‘TDZ’; Variable.ImplicitGlobalVariable = ‘ImplicitGlobalVariable’;

/* vim: set sw=4 ts=4 et tw=80 : */

},{}],82:[function(require,module,exports){ module.exports={

"_args": [
  [
    {
      "name": "escope",
      "raw": "escope@^3.6.0",
      "rawSpec": "^3.6.0",
      "scope": null,
      "spec": ">=3.6.0 <4.0.0",
      "type": "range"
    },
    "/Users/dennis/Projects/eslintrb/vendor/eslint"
  ]
],
"_from": "escope@>=3.6.0 <4.0.0",
"_id": "escope@3.6.0",
"_inCache": true,
"_installable": true,
"_location": "/escope",
"_nodeVersion": "0.12.9",
"_npmOperationalInternal": {
  "host": "packages-12-west.internal.npmjs.com",
  "tmp": "tmp/escope-3.6.0.tgz_1457720018969_0.025237560039386153"
},
"_npmUser": {
  "email": "nicholas@nczconsulting.com",
  "name": "nzakas"
},
"_npmVersion": "2.14.9",
"_phantomChildren": {},
"_requested": {
  "name": "escope",
  "raw": "escope@^3.6.0",
  "rawSpec": "^3.6.0",
  "scope": null,
  "spec": ">=3.6.0 <4.0.0",
  "type": "range"
},
"_requiredBy": [
  "/"
],
"_resolved": "https://registry.npmjs.org/escope/-/escope-3.6.0.tgz",
"_shasum": "e01975e812781a163a6dadfdd80398dc64c889c3",
"_shrinkwrap": null,
"_spec": "escope@^3.6.0",
"_where": "/Users/dennis/Projects/eslintrb/vendor/eslint",
"bugs": {
  "url": "https://github.com/estools/escope/issues"
},
"dependencies": {
  "es6-map": "^0.1.3",
  "es6-weak-map": "^2.0.1",
  "esrecurse": "^4.1.0",
  "estraverse": "^4.1.1"
},
"description": "ECMAScript scope analyzer",
"devDependencies": {
  "babel": "^6.3.26",
  "babel-preset-es2015": "^6.3.13",
  "babel-register": "^6.3.13",
  "browserify": "^13.0.0",
  "chai": "^3.4.1",
  "espree": "^3.1.1",
  "esprima": "^2.7.1",
  "gulp": "^3.9.0",
  "gulp-babel": "^6.1.1",
  "gulp-bump": "^1.0.0",
  "gulp-eslint": "^1.1.1",
  "gulp-espower": "^1.0.2",
  "gulp-filter": "^3.0.1",
  "gulp-git": "^1.6.1",
  "gulp-mocha": "^2.2.0",
  "gulp-plumber": "^1.0.1",
  "gulp-sourcemaps": "^1.6.0",
  "gulp-tag-version": "^1.3.0",
  "jsdoc": "^3.4.0",
  "lazypipe": "^1.0.1",
  "vinyl-source-stream": "^1.1.0"
},
"directories": {},
"dist": {
  "shasum": "e01975e812781a163a6dadfdd80398dc64c889c3",
  "tarball": "https://registry.npmjs.org/escope/-/escope-3.6.0.tgz"
},
"engines": {
  "node": ">=0.4.0"
},
"gitHead": "aa35861faa76a09f01203dee3497a939d70b463c",
"homepage": "http://github.com/estools/escope",
"license": "BSD-2-Clause",
"main": "lib/index.js",
"maintainers": [
  {
    "email": "utatane.tea@gmail.com",
    "name": "constellation"
  },
  {
    "email": "npm@michael.ficarra.me",
    "name": "michaelficarra"
  },
  {
    "email": "nicholas@nczconsulting.com",
    "name": "nzakas"
  }
],
"name": "escope",
"optionalDependencies": {},
"readme": "ERROR: No README data found!",
"repository": {
  "type": "git",
  "url": "git+https://github.com/estools/escope.git"
},
"scripts": {
  "jsdoc": "jsdoc src/*.js README.md",
  "lint": "gulp lint",
  "test": "gulp travis",
  "unit-test": "gulp test"
},
"version": "3.6.0"

}

},{}],83:[function(require,module,exports){ /*

Copyright (C) 2014 Yusuke Suzuki <utatane.tea@gmail.com>

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 <COPYRIGHT HOLDER> BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

*/ (function () {

'use strict';

var assign,
    estraverse,
    isArray,
    objectKeys;

assign = require('object-assign');
estraverse = require('estraverse');

isArray = Array.isArray || function isArray(array) {
    return Object.prototype.toString.call(array) === '[object Array]';
};

objectKeys = Object.keys || function (o) {
    var keys = [], key;
    for (key in o) {
        keys.push(key);
    }
    return keys;
};

function isNode(node) {
    if (node == null) {
        return false;
    }
    return typeof node === 'object' && typeof node.type === 'string';
}

function isProperty(nodeType, key) {
    return (nodeType === estraverse.Syntax.ObjectExpression || nodeType === estraverse.Syntax.ObjectPattern) && key === 'properties';
}

function Visitor(visitor, options) {
    options = options || {};

    this.__visitor = visitor ||  this;
    this.__childVisitorKeys = options.childVisitorKeys
        ? assign({}, estraverse.VisitorKeys, options.childVisitorKeys)
        : estraverse.VisitorKeys;
    if (options.fallback === 'iteration') {
        this.__fallback = objectKeys;
    } else if (typeof options.fallback === 'function') {
        this.__fallback = options.fallback;
    }
}

/* Default method for visiting children.
 * When you need to call default visiting operation inside custom visiting
 * operation, you can use it with `this.visitChildren(node)`.
 */
Visitor.prototype.visitChildren = function (node) {
    var type, children, i, iz, j, jz, child;

    if (node == null) {
        return;
    }

    type = node.type || estraverse.Syntax.Property;

    children = this.__childVisitorKeys[type];
    if (!children) {
        if (this.__fallback) {
            children = this.__fallback(node);
        } else {
            throw new Error('Unknown node type ' + type + '.');
        }
    }

    for (i = 0, iz = children.length; i < iz; ++i) {
        child = node[children[i]];
        if (child) {
            if (isArray(child)) {
                for (j = 0, jz = child.length; j < jz; ++j) {
                    if (child[j]) {
                        if (isNode(child[j]) || isProperty(type, children[i])) {
                            this.visit(child[j]);
                        }
                    }
                }
            } else if (isNode(child)) {
                this.visit(child);
            }
        }
    }
};

/* Dispatching node. */
Visitor.prototype.visit = function (node) {
    var type;

    if (node == null) {
        return;
    }

    type = node.type || estraverse.Syntax.Property;
    if (this.__visitor[type]) {
        this.__visitor[type].call(this, node);
        return;
    }
    this.visitChildren(node);
};

exports.version = require('./package.json').version;
exports.Visitor = Visitor;
exports.visit = function (node, visitor, options) {
    var v = new Visitor(visitor, options);
    v.visit(node);
};

}()); /* vim: set sw=4 ts=4 et tw=80 : */

},{“./package.json”:86,“estraverse”:84,“object-assign”:110}],84:[function(require,module,exports){ /*

Copyright (C) 2012-2013 Yusuke Suzuki <utatane.tea@gmail.com>
Copyright (C) 2012 Ariya Hidayat <ariya.hidayat@gmail.com>

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 <COPYRIGHT HOLDER> 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.

*/ /*jslint vars:false, bitwise:true*/ /*jshint indent:4*/ /*global exports:true*/ (function clone(exports) {

'use strict';

var Syntax,
    isArray,
    VisitorOption,
    VisitorKeys,
    objectCreate,
    objectKeys,
    BREAK,
    SKIP,
    REMOVE;

function ignoreJSHintError() { }

isArray = Array.isArray;
if (!isArray) {
    isArray = function isArray(array) {
        return Object.prototype.toString.call(array) === '[object Array]';
    };
}

function deepCopy(obj) {
    var ret = {}, key, val;
    for (key in obj) {
        if (obj.hasOwnProperty(key)) {
            val = obj[key];
            if (typeof val === 'object' && val !== null) {
                ret[key] = deepCopy(val);
            } else {
                ret[key] = val;
            }
        }
    }
    return ret;
}

function shallowCopy(obj) {
    var ret = {}, key;
    for (key in obj) {
        if (obj.hasOwnProperty(key)) {
            ret[key] = obj[key];
        }
    }
    return ret;
}
ignoreJSHintError(shallowCopy);

// based on LLVM libc++ upper_bound / lower_bound
// MIT License

function upperBound(array, func) {
    var diff, len, i, current;

    len = array.length;
    i = 0;

    while (len) {
        diff = len >>> 1;
        current = i + diff;
        if (func(array[current])) {
            len = diff;
        } else {
            i = current + 1;
            len -= diff + 1;
        }
    }
    return i;
}

function lowerBound(array, func) {
    var diff, len, i, current;

    len = array.length;
    i = 0;

    while (len) {
        diff = len >>> 1;
        current = i + diff;
        if (func(array[current])) {
            i = current + 1;
            len -= diff + 1;
        } else {
            len = diff;
        }
    }
    return i;
}
ignoreJSHintError(lowerBound);

objectCreate = Object.create || (function () {
    function F() { }

    return function (o) {
        F.prototype = o;
        return new F();
    };
})();

objectKeys = Object.keys || function (o) {
    var keys = [], key;
    for (key in o) {
        keys.push(key);
    }
    return keys;
};

function extend(to, from) {
    var keys = objectKeys(from), key, i, len;
    for (i = 0, len = keys.length; i < len; i += 1) {
        key = keys[i];
        to[key] = from[key];
    }
    return to;
}

Syntax = {
    AssignmentExpression: 'AssignmentExpression',
    AssignmentPattern: 'AssignmentPattern',
    ArrayExpression: 'ArrayExpression',
    ArrayPattern: 'ArrayPattern',
    ArrowFunctionExpression: 'ArrowFunctionExpression',
    AwaitExpression: 'AwaitExpression', // CAUTION: It's deferred to ES7.
    BlockStatement: 'BlockStatement',
    BinaryExpression: 'BinaryExpression',
    BreakStatement: 'BreakStatement',
    CallExpression: 'CallExpression',
    CatchClause: 'CatchClause',
    ClassBody: 'ClassBody',
    ClassDeclaration: 'ClassDeclaration',
    ClassExpression: 'ClassExpression',
    ComprehensionBlock: 'ComprehensionBlock',  // CAUTION: It's deferred to ES7.
    ComprehensionExpression: 'ComprehensionExpression',  // CAUTION: It's deferred to ES7.
    ConditionalExpression: 'ConditionalExpression',
    ContinueStatement: 'ContinueStatement',
    DebuggerStatement: 'DebuggerStatement',
    DirectiveStatement: 'DirectiveStatement',
    DoWhileStatement: 'DoWhileStatement',
    EmptyStatement: 'EmptyStatement',
    ExportAllDeclaration: 'ExportAllDeclaration',
    ExportDefaultDeclaration: 'ExportDefaultDeclaration',
    ExportNamedDeclaration: 'ExportNamedDeclaration',
    ExportSpecifier: 'ExportSpecifier',
    ExpressionStatement: 'ExpressionStatement',
    ForStatement: 'ForStatement',
    ForInStatement: 'ForInStatement',
    ForOfStatement: 'ForOfStatement',
    FunctionDeclaration: 'FunctionDeclaration',
    FunctionExpression: 'FunctionExpression',
    GeneratorExpression: 'GeneratorExpression',  // CAUTION: It's deferred to ES7.
    Identifier: 'Identifier',
    IfStatement: 'IfStatement',
    ImportDeclaration: 'ImportDeclaration',
    ImportDefaultSpecifier: 'ImportDefaultSpecifier',
    ImportNamespaceSpecifier: 'ImportNamespaceSpecifier',
    ImportSpecifier: 'ImportSpecifier',
    Literal: 'Literal',
    LabeledStatement: 'LabeledStatement',
    LogicalExpression: 'LogicalExpression',
    MemberExpression: 'MemberExpression',
    MetaProperty: 'MetaProperty',
    MethodDefinition: 'MethodDefinition',
    ModuleSpecifier: 'ModuleSpecifier',
    NewExpression: 'NewExpression',
    ObjectExpression: 'ObjectExpression',
    ObjectPattern: 'ObjectPattern',
    Program: 'Program',
    Property: 'Property',
    RestElement: 'RestElement',
    ReturnStatement: 'ReturnStatement',
    SequenceExpression: 'SequenceExpression',
    SpreadElement: 'SpreadElement',
    Super: 'Super',
    SwitchStatement: 'SwitchStatement',
    SwitchCase: 'SwitchCase',
    TaggedTemplateExpression: 'TaggedTemplateExpression',
    TemplateElement: 'TemplateElement',
    TemplateLiteral: 'TemplateLiteral',
    ThisExpression: 'ThisExpression',
    ThrowStatement: 'ThrowStatement',
    TryStatement: 'TryStatement',
    UnaryExpression: 'UnaryExpression',
    UpdateExpression: 'UpdateExpression',
    VariableDeclaration: 'VariableDeclaration',
    VariableDeclarator: 'VariableDeclarator',
    WhileStatement: 'WhileStatement',
    WithStatement: 'WithStatement',
    YieldExpression: 'YieldExpression'
};

VisitorKeys = {
    AssignmentExpression: ['left', 'right'],
    AssignmentPattern: ['left', 'right'],
    ArrayExpression: ['elements'],
    ArrayPattern: ['elements'],
    ArrowFunctionExpression: ['params', 'body'],
    AwaitExpression: ['argument'], // CAUTION: It's deferred to ES7.
    BlockStatement: ['body'],
    BinaryExpression: ['left', 'right'],
    BreakStatement: ['label'],
    CallExpression: ['callee', 'arguments'],
    CatchClause: ['param', 'body'],
    ClassBody: ['body'],
    ClassDeclaration: ['id', 'superClass', 'body'],
    ClassExpression: ['id', 'superClass', 'body'],
    ComprehensionBlock: ['left', 'right'],  // CAUTION: It's deferred to ES7.
    ComprehensionExpression: ['blocks', 'filter', 'body'],  // CAUTION: It's deferred to ES7.
    ConditionalExpression: ['test', 'consequent', 'alternate'],
    ContinueStatement: ['label'],
    DebuggerStatement: [],
    DirectiveStatement: [],
    DoWhileStatement: ['body', 'test'],
    EmptyStatement: [],
    ExportAllDeclaration: ['source'],
    ExportDefaultDeclaration: ['declaration'],
    ExportNamedDeclaration: ['declaration', 'specifiers', 'source'],
    ExportSpecifier: ['exported', 'local'],
    ExpressionStatement: ['expression'],
    ForStatement: ['init', 'test', 'update', 'body'],
    ForInStatement: ['left', 'right', 'body'],
    ForOfStatement: ['left', 'right', 'body'],
    FunctionDeclaration: ['id', 'params', 'body'],
    FunctionExpression: ['id', 'params', 'body'],
    GeneratorExpression: ['blocks', 'filter', 'body'],  // CAUTION: It's deferred to ES7.
    Identifier: [],
    IfStatement: ['test', 'consequent', 'alternate'],
    ImportDeclaration: ['specifiers', 'source'],
    ImportDefaultSpecifier: ['local'],
    ImportNamespaceSpecifier: ['local'],
    ImportSpecifier: ['imported', 'local'],
    Literal: [],
    LabeledStatement: ['label', 'body'],
    LogicalExpression: ['left', 'right'],
    MemberExpression: ['object', 'property'],
    MetaProperty: ['meta', 'property'],
    MethodDefinition: ['key', 'value'],
    ModuleSpecifier: [],
    NewExpression: ['callee', 'arguments'],
    ObjectExpression: ['properties'],
    ObjectPattern: ['properties'],
    Program: ['body'],
    Property: ['key', 'value'],
    RestElement: [ 'argument' ],
    ReturnStatement: ['argument'],
    SequenceExpression: ['expressions'],
    SpreadElement: ['argument'],
    Super: [],
    SwitchStatement: ['discriminant', 'cases'],
    SwitchCase: ['test', 'consequent'],
    TaggedTemplateExpression: ['tag', 'quasi'],
    TemplateElement: [],
    TemplateLiteral: ['quasis', 'expressions'],
    ThisExpression: [],
    ThrowStatement: ['argument'],
    TryStatement: ['block', 'handler', 'finalizer'],
    UnaryExpression: ['argument'],
    UpdateExpression: ['argument'],
    VariableDeclaration: ['declarations'],
    VariableDeclarator: ['id', 'init'],
    WhileStatement: ['test', 'body'],
    WithStatement: ['object', 'body'],
    YieldExpression: ['argument']
};

// unique id
BREAK = {};
SKIP = {};
REMOVE = {};

VisitorOption = {
    Break: BREAK,
    Skip: SKIP,
    Remove: REMOVE
};

function Reference(parent, key) {
    this.parent = parent;
    this.key = key;
}

Reference.prototype.replace = function replace(node) {
    this.parent[this.key] = node;
};

Reference.prototype.remove = function remove() {
    if (isArray(this.parent)) {
        this.parent.splice(this.key, 1);
        return true;
    } else {
        this.replace(null);
        return false;
    }
};

function Element(node, path, wrap, ref) {
    this.node = node;
    this.path = path;
    this.wrap = wrap;
    this.ref = ref;
}

function Controller() { }

// API:
// return property path array from root to current node
Controller.prototype.path = function path() {
    var i, iz, j, jz, result, element;

    function addToPath(result, path) {
        if (isArray(path)) {
            for (j = 0, jz = path.length; j < jz; ++j) {
                result.push(path[j]);
            }
        } else {
            result.push(path);
        }
    }

    // root node
    if (!this.__current.path) {
        return null;
    }

    // first node is sentinel, second node is root element
    result = [];
    for (i = 2, iz = this.__leavelist.length; i < iz; ++i) {
        element = this.__leavelist[i];
        addToPath(result, element.path);
    }
    addToPath(result, this.__current.path);
    return result;
};

// API:
// return type of current node
Controller.prototype.type = function () {
    var node = this.current();
    return node.type || this.__current.wrap;
};

// API:
// return array of parent elements
Controller.prototype.parents = function parents() {
    var i, iz, result;

    // first node is sentinel
    result = [];
    for (i = 1, iz = this.__leavelist.length; i < iz; ++i) {
        result.push(this.__leavelist[i].node);
    }

    return result;
};

// API:
// return current node
Controller.prototype.current = function current() {
    return this.__current.node;
};

Controller.prototype.__execute = function __execute(callback, element) {
    var previous, result;

    result = undefined;

    previous  = this.__current;
    this.__current = element;
    this.__state = null;
    if (callback) {
        result = callback.call(this, element.node, this.__leavelist[this.__leavelist.length - 1].node);
    }
    this.__current = previous;

    return result;
};

// API:
// notify control skip / break
Controller.prototype.notify = function notify(flag) {
    this.__state = flag;
};

// API:
// skip child nodes of current node
Controller.prototype.skip = function () {
    this.notify(SKIP);
};

// API:
// break traversals
Controller.prototype['break'] = function () {
    this.notify(BREAK);
};

// API:
// remove node
Controller.prototype.remove = function () {
    this.notify(REMOVE);
};

Controller.prototype.__initialize = function(root, visitor) {
    this.visitor = visitor;
    this.root = root;
    this.__worklist = [];
    this.__leavelist = [];
    this.__current = null;
    this.__state = null;
    this.__fallback = visitor.fallback === 'iteration';
    this.__keys = VisitorKeys;
    if (visitor.keys) {
        this.__keys = extend(objectCreate(this.__keys), visitor.keys);
    }
};

function isNode(node) {
    if (node == null) {
        return false;
    }
    return typeof node === 'object' && typeof node.type === 'string';
}

function isProperty(nodeType, key) {
    return (nodeType === Syntax.ObjectExpression || nodeType === Syntax.ObjectPattern) && 'properties' === key;
}

Controller.prototype.traverse = function traverse(root, visitor) {
    var worklist,
        leavelist,
        element,
        node,
        nodeType,
        ret,
        key,
        current,
        current2,
        candidates,
        candidate,
        sentinel;

    this.__initialize(root, visitor);

    sentinel = {};

    // reference
    worklist = this.__worklist;
    leavelist = this.__leavelist;

    // initialize
    worklist.push(new Element(root, null, null, null));
    leavelist.push(new Element(null, null, null, null));

    while (worklist.length) {
        element = worklist.pop();

        if (element === sentinel) {
            element = leavelist.pop();

            ret = this.__execute(visitor.leave, element);

            if (this.__state === BREAK || ret === BREAK) {
                return;
            }
            continue;
        }

        if (element.node) {

            ret = this.__execute(visitor.enter, element);

            if (this.__state === BREAK || ret === BREAK) {
                return;
            }

            worklist.push(sentinel);
            leavelist.push(element);

            if (this.__state === SKIP || ret === SKIP) {
                continue;
            }

            node = element.node;
            nodeType = node.type || element.wrap;
            candidates = this.__keys[nodeType];
            if (!candidates) {
                if (this.__fallback) {
                    candidates = objectKeys(node);
                } else {
                    throw new Error('Unknown node type ' + nodeType + '.');
                }
            }

            current = candidates.length;
            while ((current -= 1) >= 0) {
                key = candidates[current];
                candidate = node[key];
                if (!candidate) {
                    continue;
                }

                if (isArray(candidate)) {
                    current2 = candidate.length;
                    while ((current2 -= 1) >= 0) {
                        if (!candidate[current2]) {
                            continue;
                        }
                        if (isProperty(nodeType, candidates[current])) {
                            element = new Element(candidate[current2], [key, current2], 'Property', null);
                        } else if (isNode(candidate[current2])) {
                            element = new Element(candidate[current2], [key, current2], null, null);
                        } else {
                            continue;
                        }
                        worklist.push(element);
                    }
                } else if (isNode(candidate)) {
                    worklist.push(new Element(candidate, key, null, null));
                }
            }
        }
    }
};

Controller.prototype.replace = function replace(root, visitor) {
    function removeElem(element) {
        var i,
            key,
            nextElem,
            parent;

        if (element.ref.remove()) {
            // When the reference is an element of an array.
            key = element.ref.key;
            parent = element.ref.parent;

            // If removed from array, then decrease following items' keys.
            i = worklist.length;
            while (i--) {
                nextElem = worklist[i];
                if (nextElem.ref && nextElem.ref.parent === parent) {
                    if  (nextElem.ref.key < key) {
                        break;
                    }
                    --nextElem.ref.key;
                }
            }
        }
    }

    var worklist,
        leavelist,
        node,
        nodeType,
        target,
        element,
        current,
        current2,
        candidates,
        candidate,
        sentinel,
        outer,
        key;

    this.__initialize(root, visitor);

    sentinel = {};

    // reference
    worklist = this.__worklist;
    leavelist = this.__leavelist;

    // initialize
    outer = {
        root: root
    };
    element = new Element(root, null, null, new Reference(outer, 'root'));
    worklist.push(element);
    leavelist.push(element);

    while (worklist.length) {
        element = worklist.pop();

        if (element === sentinel) {
            element = leavelist.pop();

            target = this.__execute(visitor.leave, element);

            // node may be replaced with null,
            // so distinguish between undefined and null in this place
            if (target !== undefined && target !== BREAK && target !== SKIP && target !== REMOVE) {
                // replace
                element.ref.replace(target);
            }

            if (this.__state === REMOVE || target === REMOVE) {
                removeElem(element);
            }

            if (this.__state === BREAK || target === BREAK) {
                return outer.root;
            }
            continue;
        }

        target = this.__execute(visitor.enter, element);

        // node may be replaced with null,
        // so distinguish between undefined and null in this place
        if (target !== undefined && target !== BREAK && target !== SKIP && target !== REMOVE) {
            // replace
            element.ref.replace(target);
            element.node = target;
        }

        if (this.__state === REMOVE || target === REMOVE) {
            removeElem(element);
            element.node = null;
        }

        if (this.__state === BREAK || target === BREAK) {
            return outer.root;
        }

        // node may be null
        node = element.node;
        if (!node) {
            continue;
        }

        worklist.push(sentinel);
        leavelist.push(element);

        if (this.__state === SKIP || target === SKIP) {
            continue;
        }

        nodeType = node.type || element.wrap;
        candidates = this.__keys[nodeType];
        if (!candidates) {
            if (this.__fallback) {
                candidates = objectKeys(node);
            } else {
                throw new Error('Unknown node type ' + nodeType + '.');
            }
        }

        current = candidates.length;
        while ((current -= 1) >= 0) {
            key = candidates[current];
            candidate = node[key];
            if (!candidate) {
                continue;
            }

            if (isArray(candidate)) {
                current2 = candidate.length;
                while ((current2 -= 1) >= 0) {
                    if (!candidate[current2]) {
                        continue;
                    }
                    if (isProperty(nodeType, candidates[current])) {
                        element = new Element(candidate[current2], [key, current2], 'Property', new Reference(candidate, current2));
                    } else if (isNode(candidate[current2])) {
                        element = new Element(candidate[current2], [key, current2], null, new Reference(candidate, current2));
                    } else {
                        continue;
                    }
                    worklist.push(element);
                }
            } else if (isNode(candidate)) {
                worklist.push(new Element(candidate, key, null, new Reference(node, key)));
            }
        }
    }

    return outer.root;
};

function traverse(root, visitor) {
    var controller = new Controller();
    return controller.traverse(root, visitor);
}

function replace(root, visitor) {
    var controller = new Controller();
    return controller.replace(root, visitor);
}

function extendCommentRange(comment, tokens) {
    var target;

    target = upperBound(tokens, function search(token) {
        return token.range[0] > comment.range[0];
    });

    comment.extendedRange = [comment.range[0], comment.range[1]];

    if (target !== tokens.length) {
        comment.extendedRange[1] = tokens[target].range[0];
    }

    target -= 1;
    if (target >= 0) {
        comment.extendedRange[0] = tokens[target].range[1];
    }

    return comment;
}

function attachComments(tree, providedComments, tokens) {
    // At first, we should calculate extended comment ranges.
    var comments = [], comment, len, i, cursor;

    if (!tree.range) {
        throw new Error('attachComments needs range information');
    }

    // tokens array is empty, we attach comments to tree as 'leadingComments'
    if (!tokens.length) {
        if (providedComments.length) {
            for (i = 0, len = providedComments.length; i < len; i += 1) {
                comment = deepCopy(providedComments[i]);
                comment.extendedRange = [0, tree.range[0]];
                comments.push(comment);
            }
            tree.leadingComments = comments;
        }
        return tree;
    }

    for (i = 0, len = providedComments.length; i < len; i += 1) {
        comments.push(extendCommentRange(deepCopy(providedComments[i]), tokens));
    }

    // This is based on John Freeman's implementation.
    cursor = 0;
    traverse(tree, {
        enter: function (node) {
            var comment;

            while (cursor < comments.length) {
                comment = comments[cursor];
                if (comment.extendedRange[1] > node.range[0]) {
                    break;
                }

                if (comment.extendedRange[1] === node.range[0]) {
                    if (!node.leadingComments) {
                        node.leadingComments = [];
                    }
                    node.leadingComments.push(comment);
                    comments.splice(cursor, 1);
                } else {
                    cursor += 1;
                }
            }

            // already out of owned node
            if (cursor === comments.length) {
                return VisitorOption.Break;
            }

            if (comments[cursor].extendedRange[0] > node.range[1]) {
                return VisitorOption.Skip;
            }
        }
    });

    cursor = 0;
    traverse(tree, {
        leave: function (node) {
            var comment;

            while (cursor < comments.length) {
                comment = comments[cursor];
                if (node.range[1] < comment.extendedRange[0]) {
                    break;
                }

                if (node.range[1] === comment.extendedRange[0]) {
                    if (!node.trailingComments) {
                        node.trailingComments = [];
                    }
                    node.trailingComments.push(comment);
                    comments.splice(cursor, 1);
                } else {
                    cursor += 1;
                }
            }

            // already out of owned node
            if (cursor === comments.length) {
                return VisitorOption.Break;
            }

            if (comments[cursor].extendedRange[0] > node.range[1]) {
                return VisitorOption.Skip;
            }
        }
    });

    return tree;
}

exports.version = require('./package.json').version;
exports.Syntax = Syntax;
exports.traverse = traverse;
exports.replace = replace;
exports.attachComments = attachComments;
exports.VisitorKeys = VisitorKeys;
exports.VisitorOption = VisitorOption;
exports.Controller = Controller;
exports.cloneEnvironment = function () { return clone({}); };

return exports;

}(exports)); /* vim: set sw=4 ts=4 et tw=80 : */

},{“./package.json”:85}],85:[function(require,module,exports){ module.exports={

"_args": [
  [
    {
      "name": "estraverse",
      "raw": "estraverse@~4.1.0",
      "rawSpec": "~4.1.0",
      "scope": null,
      "spec": ">=4.1.0 <4.2.0",
      "type": "range"
    },
    "/Users/dennis/Projects/eslintrb/vendor/eslint/node_modules/esrecurse"
  ]
],
"_from": "estraverse@>=4.1.0 <4.2.0",
"_id": "estraverse@4.1.1",
"_inCache": true,
"_installable": true,
"_location": "/esrecurse/estraverse",
"_nodeVersion": "4.1.1",
"_npmUser": {
  "email": "utatane.tea@gmail.com",
  "name": "constellation"
},
"_npmVersion": "2.14.4",
"_phantomChildren": {},
"_requested": {
  "name": "estraverse",
  "raw": "estraverse@~4.1.0",
  "rawSpec": "~4.1.0",
  "scope": null,
  "spec": ">=4.1.0 <4.2.0",
  "type": "range"
},
"_requiredBy": [
  "/esrecurse"
],
"_resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.1.1.tgz",
"_shasum": "f6caca728933a850ef90661d0e17982ba47111a2",
"_shrinkwrap": null,
"_spec": "estraverse@~4.1.0",
"_where": "/Users/dennis/Projects/eslintrb/vendor/eslint/node_modules/esrecurse",
"bugs": {
  "url": "https://github.com/estools/estraverse/issues"
},
"dependencies": {},
"description": "ECMAScript JS AST traversal functions",
"devDependencies": {
  "chai": "^2.1.1",
  "coffee-script": "^1.8.0",
  "espree": "^1.11.0",
  "gulp": "^3.8.10",
  "gulp-bump": "^0.2.2",
  "gulp-filter": "^2.0.0",
  "gulp-git": "^1.0.1",
  "gulp-tag-version": "^1.2.1",
  "jshint": "^2.5.6",
  "mocha": "^2.1.0"
},
"directories": {},
"dist": {
  "shasum": "f6caca728933a850ef90661d0e17982ba47111a2",
  "tarball": "https://registry.npmjs.org/estraverse/-/estraverse-4.1.1.tgz"
},
"engines": {
  "node": ">=0.10.0"
},
"gitHead": "bbcccbfe98296585e4311c8755e1d00dcd581e3c",
"homepage": "https://github.com/estools/estraverse",
"license": "BSD-2-Clause",
"main": "estraverse.js",
"maintainers": [
  {
    "email": "utatane.tea@gmail.com",
    "name": "constellation"
  },
  {
    "email": "npm@michael.ficarra.me",
    "name": "michaelficarra"
  },
  {
    "email": "nicholas@nczconsulting.com",
    "name": "nzakas"
  }
],
"name": "estraverse",
"optionalDependencies": {},
"readme": "ERROR: No README data found!",
"repository": {
  "type": "git",
  "url": "git+ssh://git@github.com/estools/estraverse.git"
},
"scripts": {
  "lint": "jshint estraverse.js",
  "test": "npm run-script lint && npm run-script unit-test",
  "unit-test": "mocha --compilers coffee:coffee-script/register"
},
"version": "4.1.1"

}

},{}],86:[function(require,module,exports){ module.exports={

"_args": [
  [
    {
      "name": "esrecurse",
      "raw": "esrecurse@^4.1.0",
      "rawSpec": "^4.1.0",
      "scope": null,
      "spec": ">=4.1.0 <5.0.0",
      "type": "range"
    },
    "/Users/dennis/Projects/eslintrb/vendor/eslint/node_modules/escope"
  ]
],
"_from": "esrecurse@>=4.1.0 <5.0.0",
"_id": "esrecurse@4.1.0",
"_inCache": true,
"_installable": true,
"_location": "/esrecurse",
"_nodeVersion": "0.12.9",
"_npmOperationalInternal": {
  "host": "packages-13-west.internal.npmjs.com",
  "tmp": "tmp/esrecurse-4.1.0.tgz_1457712782215_0.15950557170435786"
},
"_npmUser": {
  "email": "nicholas@nczconsulting.com",
  "name": "nzakas"
},
"_npmVersion": "2.14.9",
"_phantomChildren": {},
"_requested": {
  "name": "esrecurse",
  "raw": "esrecurse@^4.1.0",
  "rawSpec": "^4.1.0",
  "scope": null,
  "spec": ">=4.1.0 <5.0.0",
  "type": "range"
},
"_requiredBy": [
  "/escope"
],
"_resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.1.0.tgz",
"_shasum": "4713b6536adf7f2ac4f327d559e7756bff648220",
"_shrinkwrap": null,
"_spec": "esrecurse@^4.1.0",
"_where": "/Users/dennis/Projects/eslintrb/vendor/eslint/node_modules/escope",
"bugs": {
  "url": "https://github.com/estools/esrecurse/issues"
},
"dependencies": {
  "estraverse": "~4.1.0",
  "object-assign": "^4.0.1"
},
"description": "ECMAScript AST recursive visitor",
"devDependencies": {
  "chai": "^3.3.0",
  "coffee-script": "^1.9.1",
  "esprima": "^2.1.0",
  "gulp": "^3.9.0",
  "gulp-bump": "^1.0.0",
  "gulp-eslint": "^1.0.0",
  "gulp-filter": "^3.0.1",
  "gulp-git": "^1.1.0",
  "gulp-mocha": "^2.1.3",
  "gulp-tag-version": "^1.2.1",
  "jsdoc": "^3.3.0-alpha10",
  "minimist": "^1.1.0"
},
"directories": {},
"dist": {
  "shasum": "4713b6536adf7f2ac4f327d559e7756bff648220",
  "tarball": "http://registry.npmjs.org/esrecurse/-/esrecurse-4.1.0.tgz"
},
"engines": {
  "node": ">=0.10.0"
},
"gitHead": "63a34714834bd7ad2063054bd4abb24fb82ca667",
"homepage": "https://github.com/estools/esrecurse",
"license": "BSD-2-Clause",
"main": "esrecurse.js",
"maintainers": [
  {
    "email": "utatane.tea@gmail.com",
    "name": "constellation"
  },
  {
    "email": "npm@michael.ficarra.me",
    "name": "michaelficarra"
  },
  {
    "email": "nicholas@nczconsulting.com",
    "name": "nzakas"
  }
],
"name": "esrecurse",
"optionalDependencies": {},
"readme": "ERROR: No README data found!",
"repository": {
  "type": "git",
  "url": "git+https://github.com/estools/esrecurse.git"
},
"scripts": {
  "lint": "gulp lint",
  "test": "gulp travis",
  "unit-test": "gulp test"
},
"version": "4.1.0"

}

},{}],87:[function(require,module,exports){ /*

Copyright (C) 2012-2013 Yusuke Suzuki <utatane.tea@gmail.com>
Copyright (C) 2012 Ariya Hidayat <ariya.hidayat@gmail.com>

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 <COPYRIGHT HOLDER> 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.

*/ /*jslint vars:false, bitwise:true*/ /*jshint indent:4*/ /*global exports:true*/ (function clone(exports) {

'use strict';

var Syntax,
    isArray,
    VisitorOption,
    VisitorKeys,
    objectCreate,
    objectKeys,
    BREAK,
    SKIP,
    REMOVE;

function ignoreJSHintError() { }

isArray = Array.isArray;
if (!isArray) {
    isArray = function isArray(array) {
        return Object.prototype.toString.call(array) === '[object Array]';
    };
}

function deepCopy(obj) {
    var ret = {}, key, val;
    for (key in obj) {
        if (obj.hasOwnProperty(key)) {
            val = obj[key];
            if (typeof val === 'object' && val !== null) {
                ret[key] = deepCopy(val);
            } else {
                ret[key] = val;
            }
        }
    }
    return ret;
}

function shallowCopy(obj) {
    var ret = {}, key;
    for (key in obj) {
        if (obj.hasOwnProperty(key)) {
            ret[key] = obj[key];
        }
    }
    return ret;
}
ignoreJSHintError(shallowCopy);

// based on LLVM libc++ upper_bound / lower_bound
// MIT License

function upperBound(array, func) {
    var diff, len, i, current;

    len = array.length;
    i = 0;

    while (len) {
        diff = len >>> 1;
        current = i + diff;
        if (func(array[current])) {
            len = diff;
        } else {
            i = current + 1;
            len -= diff + 1;
        }
    }
    return i;
}

function lowerBound(array, func) {
    var diff, len, i, current;

    len = array.length;
    i = 0;

    while (len) {
        diff = len >>> 1;
        current = i + diff;
        if (func(array[current])) {
            i = current + 1;
            len -= diff + 1;
        } else {
            len = diff;
        }
    }
    return i;
}
ignoreJSHintError(lowerBound);

objectCreate = Object.create || (function () {
    function F() { }

    return function (o) {
        F.prototype = o;
        return new F();
    };
})();

objectKeys = Object.keys || function (o) {
    var keys = [], key;
    for (key in o) {
        keys.push(key);
    }
    return keys;
};

function extend(to, from) {
    var keys = objectKeys(from), key, i, len;
    for (i = 0, len = keys.length; i < len; i += 1) {
        key = keys[i];
        to[key] = from[key];
    }
    return to;
}

Syntax = {
    AssignmentExpression: 'AssignmentExpression',
    AssignmentPattern: 'AssignmentPattern',
    ArrayExpression: 'ArrayExpression',
    ArrayPattern: 'ArrayPattern',
    ArrowFunctionExpression: 'ArrowFunctionExpression',
    AwaitExpression: 'AwaitExpression', // CAUTION: It's deferred to ES7.
    BlockStatement: 'BlockStatement',
    BinaryExpression: 'BinaryExpression',
    BreakStatement: 'BreakStatement',
    CallExpression: 'CallExpression',
    CatchClause: 'CatchClause',
    ClassBody: 'ClassBody',
    ClassDeclaration: 'ClassDeclaration',
    ClassExpression: 'ClassExpression',
    ComprehensionBlock: 'ComprehensionBlock',  // CAUTION: It's deferred to ES7.
    ComprehensionExpression: 'ComprehensionExpression',  // CAUTION: It's deferred to ES7.
    ConditionalExpression: 'ConditionalExpression',
    ContinueStatement: 'ContinueStatement',
    DebuggerStatement: 'DebuggerStatement',
    DirectiveStatement: 'DirectiveStatement',
    DoWhileStatement: 'DoWhileStatement',
    EmptyStatement: 'EmptyStatement',
    ExportAllDeclaration: 'ExportAllDeclaration',
    ExportDefaultDeclaration: 'ExportDefaultDeclaration',
    ExportNamedDeclaration: 'ExportNamedDeclaration',
    ExportSpecifier: 'ExportSpecifier',
    ExpressionStatement: 'ExpressionStatement',
    ForStatement: 'ForStatement',
    ForInStatement: 'ForInStatement',
    ForOfStatement: 'ForOfStatement',
    FunctionDeclaration: 'FunctionDeclaration',
    FunctionExpression: 'FunctionExpression',
    GeneratorExpression: 'GeneratorExpression',  // CAUTION: It's deferred to ES7.
    Identifier: 'Identifier',
    IfStatement: 'IfStatement',
    ImportDeclaration: 'ImportDeclaration',
    ImportDefaultSpecifier: 'ImportDefaultSpecifier',
    ImportNamespaceSpecifier: 'ImportNamespaceSpecifier',
    ImportSpecifier: 'ImportSpecifier',
    Literal: 'Literal',
    LabeledStatement: 'LabeledStatement',
    LogicalExpression: 'LogicalExpression',
    MemberExpression: 'MemberExpression',
    MetaProperty: 'MetaProperty',
    MethodDefinition: 'MethodDefinition',
    ModuleSpecifier: 'ModuleSpecifier',
    NewExpression: 'NewExpression',
    ObjectExpression: 'ObjectExpression',
    ObjectPattern: 'ObjectPattern',
    Program: 'Program',
    Property: 'Property',
    RestElement: 'RestElement',
    ReturnStatement: 'ReturnStatement',
    SequenceExpression: 'SequenceExpression',
    SpreadElement: 'SpreadElement',
    Super: 'Super',
    SwitchStatement: 'SwitchStatement',
    SwitchCase: 'SwitchCase',
    TaggedTemplateExpression: 'TaggedTemplateExpression',
    TemplateElement: 'TemplateElement',
    TemplateLiteral: 'TemplateLiteral',
    ThisExpression: 'ThisExpression',
    ThrowStatement: 'ThrowStatement',
    TryStatement: 'TryStatement',
    UnaryExpression: 'UnaryExpression',
    UpdateExpression: 'UpdateExpression',
    VariableDeclaration: 'VariableDeclaration',
    VariableDeclarator: 'VariableDeclarator',
    WhileStatement: 'WhileStatement',
    WithStatement: 'WithStatement',
    YieldExpression: 'YieldExpression'
};

VisitorKeys = {
    AssignmentExpression: ['left', 'right'],
    AssignmentPattern: ['left', 'right'],
    ArrayExpression: ['elements'],
    ArrayPattern: ['elements'],
    ArrowFunctionExpression: ['params', 'body'],
    AwaitExpression: ['argument'], // CAUTION: It's deferred to ES7.
    BlockStatement: ['body'],
    BinaryExpression: ['left', 'right'],
    BreakStatement: ['label'],
    CallExpression: ['callee', 'arguments'],
    CatchClause: ['param', 'body'],
    ClassBody: ['body'],
    ClassDeclaration: ['id', 'superClass', 'body'],
    ClassExpression: ['id', 'superClass', 'body'],
    ComprehensionBlock: ['left', 'right'],  // CAUTION: It's deferred to ES7.
    ComprehensionExpression: ['blocks', 'filter', 'body'],  // CAUTION: It's deferred to ES7.
    ConditionalExpression: ['test', 'consequent', 'alternate'],
    ContinueStatement: ['label'],
    DebuggerStatement: [],
    DirectiveStatement: [],
    DoWhileStatement: ['body', 'test'],
    EmptyStatement: [],
    ExportAllDeclaration: ['source'],
    ExportDefaultDeclaration: ['declaration'],
    ExportNamedDeclaration: ['declaration', 'specifiers', 'source'],
    ExportSpecifier: ['exported', 'local'],
    ExpressionStatement: ['expression'],
    ForStatement: ['init', 'test', 'update', 'body'],
    ForInStatement: ['left', 'right', 'body'],
    ForOfStatement: ['left', 'right', 'body'],
    FunctionDeclaration: ['id', 'params', 'body'],
    FunctionExpression: ['id', 'params', 'body'],
    GeneratorExpression: ['blocks', 'filter', 'body'],  // CAUTION: It's deferred to ES7.
    Identifier: [],
    IfStatement: ['test', 'consequent', 'alternate'],
    ImportDeclaration: ['specifiers', 'source'],
    ImportDefaultSpecifier: ['local'],
    ImportNamespaceSpecifier: ['local'],
    ImportSpecifier: ['imported', 'local'],
    Literal: [],
    LabeledStatement: ['label', 'body'],
    LogicalExpression: ['left', 'right'],
    MemberExpression: ['object', 'property'],
    MetaProperty: ['meta', 'property'],
    MethodDefinition: ['key', 'value'],
    ModuleSpecifier: [],
    NewExpression: ['callee', 'arguments'],
    ObjectExpression: ['properties'],
    ObjectPattern: ['properties'],
    Program: ['body'],
    Property: ['key', 'value'],
    RestElement: [ 'argument' ],
    ReturnStatement: ['argument'],
    SequenceExpression: ['expressions'],
    SpreadElement: ['argument'],
    Super: [],
    SwitchStatement: ['discriminant', 'cases'],
    SwitchCase: ['test', 'consequent'],
    TaggedTemplateExpression: ['tag', 'quasi'],
    TemplateElement: [],
    TemplateLiteral: ['quasis', 'expressions'],
    ThisExpression: [],
    ThrowStatement: ['argument'],
    TryStatement: ['block', 'handler', 'finalizer'],
    UnaryExpression: ['argument'],
    UpdateExpression: ['argument'],
    VariableDeclaration: ['declarations'],
    VariableDeclarator: ['id', 'init'],
    WhileStatement: ['test', 'body'],
    WithStatement: ['object', 'body'],
    YieldExpression: ['argument']
};

// unique id
BREAK = {};
SKIP = {};
REMOVE = {};

VisitorOption = {
    Break: BREAK,
    Skip: SKIP,
    Remove: REMOVE
};

function Reference(parent, key) {
    this.parent = parent;
    this.key = key;
}

Reference.prototype.replace = function replace(node) {
    this.parent[this.key] = node;
};

Reference.prototype.remove = function remove() {
    if (isArray(this.parent)) {
        this.parent.splice(this.key, 1);
        return true;
    } else {
        this.replace(null);
        return false;
    }
};

function Element(node, path, wrap, ref) {
    this.node = node;
    this.path = path;
    this.wrap = wrap;
    this.ref = ref;
}

function Controller() { }

// API:
// return property path array from root to current node
Controller.prototype.path = function path() {
    var i, iz, j, jz, result, element;

    function addToPath(result, path) {
        if (isArray(path)) {
            for (j = 0, jz = path.length; j < jz; ++j) {
                result.push(path[j]);
            }
        } else {
            result.push(path);
        }
    }

    // root node
    if (!this.__current.path) {
        return null;
    }

    // first node is sentinel, second node is root element
    result = [];
    for (i = 2, iz = this.__leavelist.length; i < iz; ++i) {
        element = this.__leavelist[i];
        addToPath(result, element.path);
    }
    addToPath(result, this.__current.path);
    return result;
};

// API:
// return type of current node
Controller.prototype.type = function () {
    var node = this.current();
    return node.type || this.__current.wrap;
};

// API:
// return array of parent elements
Controller.prototype.parents = function parents() {
    var i, iz, result;

    // first node is sentinel
    result = [];
    for (i = 1, iz = this.__leavelist.length; i < iz; ++i) {
        result.push(this.__leavelist[i].node);
    }

    return result;
};

// API:
// return current node
Controller.prototype.current = function current() {
    return this.__current.node;
};

Controller.prototype.__execute = function __execute(callback, element) {
    var previous, result;

    result = undefined;

    previous  = this.__current;
    this.__current = element;
    this.__state = null;
    if (callback) {
        result = callback.call(this, element.node, this.__leavelist[this.__leavelist.length - 1].node);
    }
    this.__current = previous;

    return result;
};

// API:
// notify control skip / break
Controller.prototype.notify = function notify(flag) {
    this.__state = flag;
};

// API:
// skip child nodes of current node
Controller.prototype.skip = function () {
    this.notify(SKIP);
};

// API:
// break traversals
Controller.prototype['break'] = function () {
    this.notify(BREAK);
};

// API:
// remove node
Controller.prototype.remove = function () {
    this.notify(REMOVE);
};

Controller.prototype.__initialize = function(root, visitor) {
    this.visitor = visitor;
    this.root = root;
    this.__worklist = [];
    this.__leavelist = [];
    this.__current = null;
    this.__state = null;
    this.__fallback = null;
    if (visitor.fallback === 'iteration') {
        this.__fallback = objectKeys;
    } else if (typeof visitor.fallback === 'function') {
        this.__fallback = visitor.fallback;
    }

    this.__keys = VisitorKeys;
    if (visitor.keys) {
        this.__keys = extend(objectCreate(this.__keys), visitor.keys);
    }
};

function isNode(node) {
    if (node == null) {
        return false;
    }
    return typeof node === 'object' && typeof node.type === 'string';
}

function isProperty(nodeType, key) {
    return (nodeType === Syntax.ObjectExpression || nodeType === Syntax.ObjectPattern) && 'properties' === key;
}

Controller.prototype.traverse = function traverse(root, visitor) {
    var worklist,
        leavelist,
        element,
        node,
        nodeType,
        ret,
        key,
        current,
        current2,
        candidates,
        candidate,
        sentinel;

    this.__initialize(root, visitor);

    sentinel = {};

    // reference
    worklist = this.__worklist;
    leavelist = this.__leavelist;

    // initialize
    worklist.push(new Element(root, null, null, null));
    leavelist.push(new Element(null, null, null, null));

    while (worklist.length) {
        element = worklist.pop();

        if (element === sentinel) {
            element = leavelist.pop();

            ret = this.__execute(visitor.leave, element);

            if (this.__state === BREAK || ret === BREAK) {
                return;
            }
            continue;
        }

        if (element.node) {

            ret = this.__execute(visitor.enter, element);

            if (this.__state === BREAK || ret === BREAK) {
                return;
            }

            worklist.push(sentinel);
            leavelist.push(element);

            if (this.__state === SKIP || ret === SKIP) {
                continue;
            }

            node = element.node;
            nodeType = node.type || element.wrap;
            candidates = this.__keys[nodeType];
            if (!candidates) {
                if (this.__fallback) {
                    candidates = this.__fallback(node);
                } else {
                    throw new Error('Unknown node type ' + nodeType + '.');
                }
            }

            current = candidates.length;
            while ((current -= 1) >= 0) {
                key = candidates[current];
                candidate = node[key];
                if (!candidate) {
                    continue;
                }

                if (isArray(candidate)) {
                    current2 = candidate.length;
                    while ((current2 -= 1) >= 0) {
                        if (!candidate[current2]) {
                            continue;
                        }
                        if (isProperty(nodeType, candidates[current])) {
                            element = new Element(candidate[current2], [key, current2], 'Property', null);
                        } else if (isNode(candidate[current2])) {
                            element = new Element(candidate[current2], [key, current2], null, null);
                        } else {
                            continue;
                        }
                        worklist.push(element);
                    }
                } else if (isNode(candidate)) {
                    worklist.push(new Element(candidate, key, null, null));
                }
            }
        }
    }
};

Controller.prototype.replace = function replace(root, visitor) {
    var worklist,
        leavelist,
        node,
        nodeType,
        target,
        element,
        current,
        current2,
        candidates,
        candidate,
        sentinel,
        outer,
        key;

    function removeElem(element) {
        var i,
            key,
            nextElem,
            parent;

        if (element.ref.remove()) {
            // When the reference is an element of an array.
            key = element.ref.key;
            parent = element.ref.parent;

            // If removed from array, then decrease following items' keys.
            i = worklist.length;
            while (i--) {
                nextElem = worklist[i];
                if (nextElem.ref && nextElem.ref.parent === parent) {
                    if  (nextElem.ref.key < key) {
                        break;
                    }
                    --nextElem.ref.key;
                }
            }
        }
    }

    this.__initialize(root, visitor);

    sentinel = {};

    // reference
    worklist = this.__worklist;
    leavelist = this.__leavelist;

    // initialize
    outer = {
        root: root
    };
    element = new Element(root, null, null, new Reference(outer, 'root'));
    worklist.push(element);
    leavelist.push(element);

    while (worklist.length) {
        element = worklist.pop();

        if (element === sentinel) {
            element = leavelist.pop();

            target = this.__execute(visitor.leave, element);

            // node may be replaced with null,
            // so distinguish between undefined and null in this place
            if (target !== undefined && target !== BREAK && target !== SKIP && target !== REMOVE) {
                // replace
                element.ref.replace(target);
            }

            if (this.__state === REMOVE || target === REMOVE) {
                removeElem(element);
            }

            if (this.__state === BREAK || target === BREAK) {
                return outer.root;
            }
            continue;
        }

        target = this.__execute(visitor.enter, element);

        // node may be replaced with null,
        // so distinguish between undefined and null in this place
        if (target !== undefined && target !== BREAK && target !== SKIP && target !== REMOVE) {
            // replace
            element.ref.replace(target);
            element.node = target;
        }

        if (this.__state === REMOVE || target === REMOVE) {
            removeElem(element);
            element.node = null;
        }

        if (this.__state === BREAK || target === BREAK) {
            return outer.root;
        }

        // node may be null
        node = element.node;
        if (!node) {
            continue;
        }

        worklist.push(sentinel);
        leavelist.push(element);

        if (this.__state === SKIP || target === SKIP) {
            continue;
        }

        nodeType = node.type || element.wrap;
        candidates = this.__keys[nodeType];
        if (!candidates) {
            if (this.__fallback) {
                candidates = this.__fallback(node);
            } else {
                throw new Error('Unknown node type ' + nodeType + '.');
            }
        }

        current = candidates.length;
        while ((current -= 1) >= 0) {
            key = candidates[current];
            candidate = node[key];
            if (!candidate) {
                continue;
            }

            if (isArray(candidate)) {
                current2 = candidate.length;
                while ((current2 -= 1) >= 0) {
                    if (!candidate[current2]) {
                        continue;
                    }
                    if (isProperty(nodeType, candidates[current])) {
                        element = new Element(candidate[current2], [key, current2], 'Property', new Reference(candidate, current2));
                    } else if (isNode(candidate[current2])) {
                        element = new Element(candidate[current2], [key, current2], null, new Reference(candidate, current2));
                    } else {
                        continue;
                    }
                    worklist.push(element);
                }
            } else if (isNode(candidate)) {
                worklist.push(new Element(candidate, key, null, new Reference(node, key)));
            }
        }
    }

    return outer.root;
};

function traverse(root, visitor) {
    var controller = new Controller();
    return controller.traverse(root, visitor);
}

function replace(root, visitor) {
    var controller = new Controller();
    return controller.replace(root, visitor);
}

function extendCommentRange(comment, tokens) {
    var target;

    target = upperBound(tokens, function search(token) {
        return token.range[0] > comment.range[0];
    });

    comment.extendedRange = [comment.range[0], comment.range[1]];

    if (target !== tokens.length) {
        comment.extendedRange[1] = tokens[target].range[0];
    }

    target -= 1;
    if (target >= 0) {
        comment.extendedRange[0] = tokens[target].range[1];
    }

    return comment;
}

function attachComments(tree, providedComments, tokens) {
    // At first, we should calculate extended comment ranges.
    var comments = [], comment, len, i, cursor;

    if (!tree.range) {
        throw new Error('attachComments needs range information');
    }

    // tokens array is empty, we attach comments to tree as 'leadingComments'
    if (!tokens.length) {
        if (providedComments.length) {
            for (i = 0, len = providedComments.length; i < len; i += 1) {
                comment = deepCopy(providedComments[i]);
                comment.extendedRange = [0, tree.range[0]];
                comments.push(comment);
            }
            tree.leadingComments = comments;
        }
        return tree;
    }

    for (i = 0, len = providedComments.length; i < len; i += 1) {
        comments.push(extendCommentRange(deepCopy(providedComments[i]), tokens));
    }

    // This is based on John Freeman's implementation.
    cursor = 0;
    traverse(tree, {
        enter: function (node) {
            var comment;

            while (cursor < comments.length) {
                comment = comments[cursor];
                if (comment.extendedRange[1] > node.range[0]) {
                    break;
                }

                if (comment.extendedRange[1] === node.range[0]) {
                    if (!node.leadingComments) {
                        node.leadingComments = [];
                    }
                    node.leadingComments.push(comment);
                    comments.splice(cursor, 1);
                } else {
                    cursor += 1;
                }
            }

            // already out of owned node
            if (cursor === comments.length) {
                return VisitorOption.Break;
            }

            if (comments[cursor].extendedRange[0] > node.range[1]) {
                return VisitorOption.Skip;
            }
        }
    });

    cursor = 0;
    traverse(tree, {
        leave: function (node) {
            var comment;

            while (cursor < comments.length) {
                comment = comments[cursor];
                if (node.range[1] < comment.extendedRange[0]) {
                    break;
                }

                if (node.range[1] === comment.extendedRange[0]) {
                    if (!node.trailingComments) {
                        node.trailingComments = [];
                    }
                    node.trailingComments.push(comment);
                    comments.splice(cursor, 1);
                } else {
                    cursor += 1;
                }
            }

            // already out of owned node
            if (cursor === comments.length) {
                return VisitorOption.Break;
            }

            if (comments[cursor].extendedRange[0] > node.range[1]) {
                return VisitorOption.Skip;
            }
        }
    });

    return tree;
}

exports.version = require('./package.json').version;
exports.Syntax = Syntax;
exports.traverse = traverse;
exports.replace = replace;
exports.attachComments = attachComments;
exports.VisitorKeys = VisitorKeys;
exports.VisitorOption = VisitorOption;
exports.Controller = Controller;
exports.cloneEnvironment = function () { return clone({}); };

return exports;

}(exports)); /* vim: set sw=4 ts=4 et tw=80 : */

},{“./package.json”:88}],88:[function(require,module,exports){ module.exports={

"_args": [
  [
    {
      "name": "estraverse",
      "raw": "estraverse@^4.2.0",
      "rawSpec": "^4.2.0",
      "scope": null,
      "spec": ">=4.2.0 <5.0.0",
      "type": "range"
    },
    "/Users/dennis/Projects/eslintrb/vendor/eslint"
  ]
],
"_from": "estraverse@>=4.2.0 <5.0.0",
"_id": "estraverse@4.2.0",
"_inCache": true,
"_installable": true,
"_location": "/estraverse",
"_nodeVersion": "0.12.9",
"_npmOperationalInternal": {
  "host": "packages-12-west.internal.npmjs.com",
  "tmp": "tmp/estraverse-4.2.0.tgz_1457646738925_0.7118953282479197"
},
"_npmUser": {
  "email": "nicholas@nczconsulting.com",
  "name": "nzakas"
},
"_npmVersion": "2.14.9",
"_phantomChildren": {},
"_requested": {
  "name": "estraverse",
  "raw": "estraverse@^4.2.0",
  "rawSpec": "^4.2.0",
  "scope": null,
  "spec": ">=4.2.0 <5.0.0",
  "type": "range"
},
"_requiredBy": [
  "/",
  "/escope"
],
"_resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz",
"_shasum": "0dee3fed31fcd469618ce7342099fc1afa0bdb13",
"_shrinkwrap": null,
"_spec": "estraverse@^4.2.0",
"_where": "/Users/dennis/Projects/eslintrb/vendor/eslint",
"bugs": {
  "url": "https://github.com/estools/estraverse/issues"
},
"dependencies": {},
"description": "ECMAScript JS AST traversal functions",
"devDependencies": {
  "babel-preset-es2015": "^6.3.13",
  "babel-register": "^6.3.13",
  "chai": "^2.1.1",
  "espree": "^1.11.0",
  "gulp": "^3.8.10",
  "gulp-bump": "^0.2.2",
  "gulp-filter": "^2.0.0",
  "gulp-git": "^1.0.1",
  "gulp-tag-version": "^1.2.1",
  "jshint": "^2.5.6",
  "mocha": "^2.1.0"
},
"directories": {},
"dist": {
  "shasum": "0dee3fed31fcd469618ce7342099fc1afa0bdb13",
  "tarball": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz"
},
"engines": {
  "node": ">=0.10.0"
},
"gitHead": "6f6a4e99653908e859c7c10d04d9518bf4844ede",
"homepage": "https://github.com/estools/estraverse",
"license": "BSD-2-Clause",
"main": "estraverse.js",
"maintainers": [
  {
    "email": "utatane.tea@gmail.com",
    "name": "constellation"
  },
  {
    "email": "npm@michael.ficarra.me",
    "name": "michaelficarra"
  },
  {
    "email": "nicholas@nczconsulting.com",
    "name": "nzakas"
  }
],
"name": "estraverse",
"optionalDependencies": {},
"readme": "ERROR: No README data found!",
"repository": {
  "type": "git",
  "url": "git+ssh://git@github.com/estools/estraverse.git"
},
"scripts": {
  "lint": "jshint estraverse.js",
  "test": "npm run-script lint && npm run-script unit-test",
  "unit-test": "mocha --compilers js:babel-register"
},
"version": "4.2.0"

}

},{}],89:[function(require,module,exports){ arguments[13].apply(exports,arguments) },{“dup”:13}],90:[function(require,module,exports){ /*

Copyright (C) 2013-2014 Yusuke Suzuki <utatane.tea@gmail.com>
Copyright (C) 2014 Ivan Nikulin <ifaaan@gmail.com>

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 <COPYRIGHT HOLDER> BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

*/

(function () {

'use strict';

var ES6Regex, ES5Regex, NON_ASCII_WHITESPACES, IDENTIFIER_START, IDENTIFIER_PART, ch;

// See `tools/generate-identifier-regex.js`.
ES5Regex = {
    // ECMAScript 5.1/Unicode v7.0.0 NonAsciiIdentifierStart:
    NonAsciiIdentifierStart: /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B2\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,
    // ECMAScript 5.1/Unicode v7.0.0 NonAsciiIdentifierPart:
    NonAsciiIdentifierPart: /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B2\u08E4-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58\u0C59\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA69D\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2D\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/
};

ES6Regex = {
    // ECMAScript 6/Unicode v7.0.0 NonAsciiIdentifierStart:
    NonAsciiIdentifierStart: /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B2\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDE00-\uDE11\uDE13-\uDE2B\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDE00-\uDE2F\uDE44\uDE80-\uDEAA]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF98]|\uD809[\uDC00-\uDC6E]|[\uD80C\uD840-\uD868\uD86A-\uD86C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D]|\uD87E[\uDC00-\uDE1D]/,
    // ECMAScript 6/Unicode v7.0.0 NonAsciiIdentifierPart:
    NonAsciiIdentifierPart: /[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B2\u08E4-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58\u0C59\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA69D\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2D\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDD0-\uDDDA\uDE00-\uDE11\uDE13-\uDE37\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF01-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF98]|\uD809[\uDC00-\uDC6E]|[\uD80C\uD840-\uD868\uD86A-\uD86C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/
};

function isDecimalDigit(ch) {
    return 0x30 <= ch && ch <= 0x39;  // 0..9
}

function isHexDigit(ch) {
    return 0x30 <= ch && ch <= 0x39 ||  // 0..9
        0x61 <= ch && ch <= 0x66 ||     // a..f
        0x41 <= ch && ch <= 0x46;       // A..F
}

function isOctalDigit(ch) {
    return ch >= 0x30 && ch <= 0x37;  // 0..7
}

// 7.2 White Space

NON_ASCII_WHITESPACES = [
    0x1680, 0x180E,
    0x2000, 0x2001, 0x2002, 0x2003, 0x2004, 0x2005, 0x2006, 0x2007, 0x2008, 0x2009, 0x200A,
    0x202F, 0x205F,
    0x3000,
    0xFEFF
];

function isWhiteSpace(ch) {
    return ch === 0x20 || ch === 0x09 || ch === 0x0B || ch === 0x0C || ch === 0xA0 ||
        ch >= 0x1680 && NON_ASCII_WHITESPACES.indexOf(ch) >= 0;
}

// 7.3 Line Terminators

function isLineTerminator(ch) {
    return ch === 0x0A || ch === 0x0D || ch === 0x2028 || ch === 0x2029;
}

// 7.6 Identifier Names and Identifiers

function fromCodePoint(cp) {
    if (cp <= 0xFFFF) { return String.fromCharCode(cp); }
    var cu1 = String.fromCharCode(Math.floor((cp - 0x10000) / 0x400) + 0xD800);
    var cu2 = String.fromCharCode(((cp - 0x10000) % 0x400) + 0xDC00);
    return cu1 + cu2;
}

IDENTIFIER_START = new Array(0x80);
for(ch = 0; ch < 0x80; ++ch) {
    IDENTIFIER_START[ch] =
        ch >= 0x61 && ch <= 0x7A ||  // a..z
        ch >= 0x41 && ch <= 0x5A ||  // A..Z
        ch === 0x24 || ch === 0x5F;  // $ (dollar) and _ (underscore)
}

IDENTIFIER_PART = new Array(0x80);
for(ch = 0; ch < 0x80; ++ch) {
    IDENTIFIER_PART[ch] =
        ch >= 0x61 && ch <= 0x7A ||  // a..z
        ch >= 0x41 && ch <= 0x5A ||  // A..Z
        ch >= 0x30 && ch <= 0x39 ||  // 0..9
        ch === 0x24 || ch === 0x5F;  // $ (dollar) and _ (underscore)
}

function isIdentifierStartES5(ch) {
    return ch < 0x80 ? IDENTIFIER_START[ch] : ES5Regex.NonAsciiIdentifierStart.test(fromCodePoint(ch));
}

function isIdentifierPartES5(ch) {
    return ch < 0x80 ? IDENTIFIER_PART[ch] : ES5Regex.NonAsciiIdentifierPart.test(fromCodePoint(ch));
}

function isIdentifierStartES6(ch) {
    return ch < 0x80 ? IDENTIFIER_START[ch] : ES6Regex.NonAsciiIdentifierStart.test(fromCodePoint(ch));
}

function isIdentifierPartES6(ch) {
    return ch < 0x80 ? IDENTIFIER_PART[ch] : ES6Regex.NonAsciiIdentifierPart.test(fromCodePoint(ch));
}

module.exports = {
    isDecimalDigit: isDecimalDigit,
    isHexDigit: isHexDigit,
    isOctalDigit: isOctalDigit,
    isWhiteSpace: isWhiteSpace,
    isLineTerminator: isLineTerminator,
    isIdentifierStartES5: isIdentifierStartES5,
    isIdentifierPartES5: isIdentifierPartES5,
    isIdentifierStartES6: isIdentifierStartES6,
    isIdentifierPartES6: isIdentifierPartES6
};

}()); /* vim: set sw=4 ts=4 et tw=80 : */

},{}],91:[function(require,module,exports){ /*

Copyright (C) 2013 Yusuke Suzuki <utatane.tea@gmail.com>

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 <COPYRIGHT HOLDER> BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

*/

(function () {

'use strict';

var code = require('./code');

function isStrictModeReservedWordES6(id) {
    switch (id) {
    case 'implements':
    case 'interface':
    case 'package':
    case 'private':
    case 'protected':
    case 'public':
    case 'static':
    case 'let':
        return true;
    default:
        return false;
    }
}

function isKeywordES5(id, strict) {
    // yield should not be treated as keyword under non-strict mode.
    if (!strict && id === 'yield') {
        return false;
    }
    return isKeywordES6(id, strict);
}

function isKeywordES6(id, strict) {
    if (strict && isStrictModeReservedWordES6(id)) {
        return true;
    }

    switch (id.length) {
    case 2:
        return (id === 'if') || (id === 'in') || (id === 'do');
    case 3:
        return (id === 'var') || (id === 'for') || (id === 'new') || (id === 'try');
    case 4:
        return (id === 'this') || (id === 'else') || (id === 'case') ||
            (id === 'void') || (id === 'with') || (id === 'enum');
    case 5:
        return (id === 'while') || (id === 'break') || (id === 'catch') ||
            (id === 'throw') || (id === 'const') || (id === 'yield') ||
            (id === 'class') || (id === 'super');
    case 6:
        return (id === 'return') || (id === 'typeof') || (id === 'delete') ||
            (id === 'switch') || (id === 'export') || (id === 'import');
    case 7:
        return (id === 'default') || (id === 'finally') || (id === 'extends');
    case 8:
        return (id === 'function') || (id === 'continue') || (id === 'debugger');
    case 10:
        return (id === 'instanceof');
    default:
        return false;
    }
}

function isReservedWordES5(id, strict) {
    return id === 'null' || id === 'true' || id === 'false' || isKeywordES5(id, strict);
}

function isReservedWordES6(id, strict) {
    return id === 'null' || id === 'true' || id === 'false' || isKeywordES6(id, strict);
}

function isRestrictedWord(id) {
    return id === 'eval' || id === 'arguments';
}

function isIdentifierNameES5(id) {
    var i, iz, ch;

    if (id.length === 0) { return false; }

    ch = id.charCodeAt(0);
    if (!code.isIdentifierStartES5(ch)) {
        return false;
    }

    for (i = 1, iz = id.length; i < iz; ++i) {
        ch = id.charCodeAt(i);
        if (!code.isIdentifierPartES5(ch)) {
            return false;
        }
    }
    return true;
}

function decodeUtf16(lead, trail) {
    return (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000;
}

function isIdentifierNameES6(id) {
    var i, iz, ch, lowCh, check;

    if (id.length === 0) { return false; }

    check = code.isIdentifierStartES6;
    for (i = 0, iz = id.length; i < iz; ++i) {
        ch = id.charCodeAt(i);
        if (0xD800 <= ch && ch <= 0xDBFF) {
            ++i;
            if (i >= iz) { return false; }
            lowCh = id.charCodeAt(i);
            if (!(0xDC00 <= lowCh && lowCh <= 0xDFFF)) {
                return false;
            }
            ch = decodeUtf16(ch, lowCh);
        }
        if (!check(ch)) {
            return false;
        }
        check = code.isIdentifierPartES6;
    }
    return true;
}

function isIdentifierES5(id, strict) {
    return isIdentifierNameES5(id) && !isReservedWordES5(id, strict);
}

function isIdentifierES6(id, strict) {
    return isIdentifierNameES6(id) && !isReservedWordES6(id, strict);
}

module.exports = {
    isKeywordES5: isKeywordES5,
    isKeywordES6: isKeywordES6,
    isReservedWordES5: isReservedWordES5,
    isReservedWordES6: isReservedWordES6,
    isRestrictedWord: isRestrictedWord,
    isIdentifierNameES5: isIdentifierNameES5,
    isIdentifierNameES6: isIdentifierNameES6,
    isIdentifierES5: isIdentifierES5,
    isIdentifierES6: isIdentifierES6
};

}()); /* vim: set sw=4 ts=4 et tw=80 : */

},{“./code”:90}],92:[function(require,module,exports){ arguments[16].apply(exports,arguments) },{“./ast”:89,“./code”:90,“./keyword”:91,“dup”:16}],93:[function(require,module,exports){ ‘use strict’;

var d = require(‘d’)

, callable = require('es5-ext/object/valid-callable')

, apply = Function.prototype.apply, call = Function.prototype.call
, create = Object.create, defineProperty = Object.defineProperty
, defineProperties = Object.defineProperties
, hasOwnProperty = Object.prototype.hasOwnProperty
, descriptor = { configurable: true, enumerable: false, writable: true }

, on, once, off, emit, methods, descriptors, base;

on = function (type, listener) {

var data;

callable(listener);

if (!hasOwnProperty.call(this, '__ee__')) {
        data = descriptor.value = create(null);
        defineProperty(this, '__ee__', descriptor);
        descriptor.value = null;
} else {
        data = this.__ee__;
}
if (!data[type]) data[type] = listener;
else if (typeof data[type] === 'object') data[type].push(listener);
else data[type] = [data[type], listener];

return this;

};

once = function (type, listener) {

var once, self;

callable(listener);
self = this;
on.call(this, type, once = function () {
        off.call(self, type, once);
        apply.call(listener, this, arguments);
});

once.__eeOnceListener__ = listener;
return this;

};

off = function (type, listener) {

var data, listeners, candidate, i;

callable(listener);

if (!hasOwnProperty.call(this, '__ee__')) return this;
data = this.__ee__;
if (!data[type]) return this;
listeners = data[type];

if (typeof listeners === 'object') {
        for (i = 0; (candidate = listeners[i]); ++i) {
                if ((candidate === listener) ||
                                (candidate.__eeOnceListener__ === listener)) {
                        if (listeners.length === 2) data[type] = listeners[i ? 0 : 1];
                        else listeners.splice(i, 1);
                }
        }
} else {
        if ((listeners === listener) ||
                        (listeners.__eeOnceListener__ === listener)) {
                delete data[type];
        }
}

return this;

};

emit = function (type) {

var i, l, listener, listeners, args;

if (!hasOwnProperty.call(this, '__ee__')) return;
listeners = this.__ee__[type];
if (!listeners) return;

if (typeof listeners === 'object') {
        l = arguments.length;
        args = new Array(l - 1);
        for (i = 1; i < l; ++i) args[i - 1] = arguments[i];

        listeners = listeners.slice();
        for (i = 0; (listener = listeners[i]); ++i) {
                apply.call(listener, this, args);
        }
} else {
        switch (arguments.length) {
        case 1:
                call.call(listeners, this);
                break;
        case 2:
                call.call(listeners, this, arguments[1]);
                break;
        case 3:
                call.call(listeners, this, arguments[1], arguments[2]);
                break;
        default:
                l = arguments.length;
                args = new Array(l - 1);
                for (i = 1; i < l; ++i) {
                        args[i - 1] = arguments[i];
                }
                apply.call(listeners, this, args);
        }
}

};

methods = {

on: on,
once: once,
off: off,
emit: emit

};

descriptors = {

on: d(on),
once: d(once),
off: d(off),
emit: d(emit)

};

base = defineProperties({}, descriptors);

module.exports = exports = function (o) {

return (o == null) ? create(base) : defineProperties(Object(o), descriptors);

}; exports.methods = methods;

},{“d”:7,“es5-ext/object/valid-callable”:44}],94:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // 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.

function EventEmitter() {

this._events = this._events || {};
this._maxListeners = this._maxListeners || undefined;

} module.exports = EventEmitter;

// Backwards-compat with node 0.10.x EventEmitter.EventEmitter = EventEmitter;

EventEmitter.prototype._events = undefined; EventEmitter.prototype._maxListeners = undefined;

// By default EventEmitters will print a warning if more than 10 listeners are // added to it. This is a useful default which helps finding memory leaks. EventEmitter.defaultMaxListeners = 10;

// Obviously not all Emitters should be limited to 10. This function allows // that to be increased. Set to zero for unlimited. EventEmitter.prototype.setMaxListeners = function(n) {

if (!isNumber(n) || n < 0 || isNaN(n))
  throw TypeError('n must be a positive number');
this._maxListeners = n;
return this;

};

EventEmitter.prototype.emit = function(type) {

var er, handler, len, args, i, listeners;

if (!this._events)
  this._events = {};

// If there is no 'error' event listener then throw.
if (type === 'error') {
  if (!this._events.error ||
      (isObject(this._events.error) && !this._events.error.length)) {
    er = arguments[1];
    if (er instanceof Error) {
      throw er; // Unhandled 'error' event
    }
    throw TypeError('Uncaught, unspecified "error" event.');
  }
}

handler = this._events[type];

if (isUndefined(handler))
  return false;

if (isFunction(handler)) {
  switch (arguments.length) {
    // fast cases
    case 1:
      handler.call(this);
      break;
    case 2:
      handler.call(this, arguments[1]);
      break;
    case 3:
      handler.call(this, arguments[1], arguments[2]);
      break;
    // slower
    default:
      args = Array.prototype.slice.call(arguments, 1);
      handler.apply(this, args);
  }
} else if (isObject(handler)) {
  args = Array.prototype.slice.call(arguments, 1);
  listeners = handler.slice();
  len = listeners.length;
  for (i = 0; i < len; i++)
    listeners[i].apply(this, args);
}

return true;

};

EventEmitter.prototype.addListener = function(type, listener) {

var m;

if (!isFunction(listener))
  throw TypeError('listener must be a function');

if (!this._events)
  this._events = {};

// To avoid recursion in the case that type === "newListener"! Before
// adding it to the listeners, first emit "newListener".
if (this._events.newListener)
  this.emit('newListener', type,
            isFunction(listener.listener) ?
            listener.listener : listener);

if (!this._events[type])
  // Optimize the case of one listener. Don't need the extra array object.
  this._events[type] = listener;
else if (isObject(this._events[type]))
  // If we've already got an array, just append.
  this._events[type].push(listener);
else
  // Adding the second element, need to change to array.
  this._events[type] = [this._events[type], listener];

// Check for listener leak
if (isObject(this._events[type]) && !this._events[type].warned) {
  if (!isUndefined(this._maxListeners)) {
    m = this._maxListeners;
  } else {
    m = EventEmitter.defaultMaxListeners;
  }

  if (m && m > 0 && this._events[type].length > m) {
    this._events[type].warned = true;
    console.error('(node) warning: possible EventEmitter memory ' +
                  'leak detected. %d listeners added. ' +
                  'Use emitter.setMaxListeners() to increase limit.',
                  this._events[type].length);
    if (typeof console.trace === 'function') {
      // not supported in IE 10
      console.trace();
    }
  }
}

return this;

};

EventEmitter.prototype.on = EventEmitter.prototype.addListener;

EventEmitter.prototype.once = function(type, listener) {

if (!isFunction(listener))
  throw TypeError('listener must be a function');

var fired = false;

function g() {
  this.removeListener(type, g);

  if (!fired) {
    fired = true;
    listener.apply(this, arguments);
  }
}

g.listener = listener;
this.on(type, g);

return this;

};

// emits a ‘removeListener’ event iff the listener was removed EventEmitter.prototype.removeListener = function(type, listener) {

var list, position, length, i;

if (!isFunction(listener))
  throw TypeError('listener must be a function');

if (!this._events || !this._events[type])
  return this;

list = this._events[type];
length = list.length;
position = -1;

if (list === listener ||
    (isFunction(list.listener) && list.listener === listener)) {
  delete this._events[type];
  if (this._events.removeListener)
    this.emit('removeListener', type, listener);

} else if (isObject(list)) {
  for (i = length; i-- > 0;) {
    if (list[i] === listener ||
        (list[i].listener && list[i].listener === listener)) {
      position = i;
      break;
    }
  }

  if (position < 0)
    return this;

  if (list.length === 1) {
    list.length = 0;
    delete this._events[type];
  } else {
    list.splice(position, 1);
  }

  if (this._events.removeListener)
    this.emit('removeListener', type, listener);
}

return this;

};

EventEmitter.prototype.removeAllListeners = function(type) {

var key, listeners;

if (!this._events)
  return this;

// not listening for removeListener, no need to emit
if (!this._events.removeListener) {
  if (arguments.length === 0)
    this._events = {};
  else if (this._events[type])
    delete this._events[type];
  return this;
}

// emit removeListener for all listeners on all events
if (arguments.length === 0) {
  for (key in this._events) {
    if (key === 'removeListener') continue;
    this.removeAllListeners(key);
  }
  this.removeAllListeners('removeListener');
  this._events = {};
  return this;
}

listeners = this._events[type];

if (isFunction(listeners)) {
  this.removeListener(type, listeners);
} else if (listeners) {
  // LIFO order
  while (listeners.length)
    this.removeListener(type, listeners[listeners.length - 1]);
}
delete this._events[type];

return this;

};

EventEmitter.prototype.listeners = function(type) {

var ret;
if (!this._events || !this._events[type])
  ret = [];
else if (isFunction(this._events[type]))
  ret = [this._events[type]];
else
  ret = this._events[type].slice();
return ret;

};

EventEmitter.prototype.listenerCount = function(type) {

if (this._events) {
  var evlistener = this._events[type];

  if (isFunction(evlistener))
    return 1;
  else if (evlistener)
    return evlistener.length;
}
return 0;

};

EventEmitter.listenerCount = function(emitter, type) {

return emitter.listenerCount(type);

};

function isFunction(arg) {

return typeof arg === 'function';

}

function isNumber(arg) {

return typeof arg === 'number';

}

function isObject(arg) {

return typeof arg === 'object' && arg !== null;

}

function isUndefined(arg) {

return arg === void 0;

}

},{}],95:[function(require,module,exports){ var util = require(‘util’)

var INDENT_START = /[{[]/ var INDENT_END = /[}]]/

module.exports = function() {

var lines = []
var indent = 0

var push = function(str) {
  var spaces = ''
  while (spaces.length < indent*2) spaces += '  '
  lines.push(spaces+str)
}

var line = function(fmt) {
  if (!fmt) return line

  if (INDENT_END.test(fmt.trim()[0]) && INDENT_START.test(fmt[fmt.length-1])) {
    indent--
    push(util.format.apply(util, arguments))
    indent++
    return line
  }
  if (INDENT_START.test(fmt[fmt.length-1])) {
    push(util.format.apply(util, arguments))
    indent++
    return line
  }
  if (INDENT_END.test(fmt.trim()[0])) {
    indent--
    push(util.format.apply(util, arguments))
    return line
  }

  push(util.format.apply(util, arguments))
  return line
}

line.toString = function() {
  return lines.join('\n')
}

line.toFunction = function(scope) {
  var src = 'return ('+line.toString()+')'

  var keys = Object.keys(scope || {}).map(function(key) {
    return key
  })

  var vals = keys.map(function(key) {
    return scope[key]
  })

  return Function.apply(null, keys.concat(src)).apply(null, vals)
}

if (arguments.length) line.apply(null, arguments)

return line

}

},{“util”:122}],96:[function(require,module,exports){ var isProperty = require(‘is-property’)

var gen = function(obj, prop) {

return isProperty(prop) ? obj+'.'+prop : obj+'['+JSON.stringify(prop)+']'

}

gen.valid = isProperty gen.property = function (prop) {

return isProperty(prop) ? prop : JSON.stringify(prop)

}

module.exports = gen

},{“is-property”:102}],97:[function(require,module,exports){ module.exports={

"builtin": {
        "Array": false,
        "ArrayBuffer": false,
        "Boolean": false,
        "constructor": false,
        "DataView": false,
        "Date": false,
        "decodeURI": false,
        "decodeURIComponent": false,
        "encodeURI": false,
        "encodeURIComponent": false,
        "Error": false,
        "escape": false,
        "eval": false,
        "EvalError": false,
        "Float32Array": false,
        "Float64Array": false,
        "Function": false,
        "hasOwnProperty": false,
        "Infinity": false,
        "Int16Array": false,
        "Int32Array": false,
        "Int8Array": false,
        "isFinite": false,
        "isNaN": false,
        "isPrototypeOf": false,
        "JSON": false,
        "Map": false,
        "Math": false,
        "NaN": false,
        "Number": false,
        "Object": false,
        "parseFloat": false,
        "parseInt": false,
        "Promise": false,
        "propertyIsEnumerable": false,
        "Proxy": false,
        "RangeError": false,
        "ReferenceError": false,
        "Reflect": false,
        "RegExp": false,
        "Set": false,
        "String": false,
        "Symbol": false,
        "SyntaxError": false,
        "System": false,
        "toLocaleString": false,
        "toString": false,
        "TypeError": false,
        "Uint16Array": false,
        "Uint32Array": false,
        "Uint8Array": false,
        "Uint8ClampedArray": false,
        "undefined": false,
        "unescape": false,
        "URIError": false,
        "valueOf": false,
        "WeakMap": false,
        "WeakSet": false
},
"es5": {
        "Array": false,
        "Boolean": false,
        "constructor": false,
        "Date": false,
        "decodeURI": false,
        "decodeURIComponent": false,
        "encodeURI": false,
        "encodeURIComponent": false,
        "Error": false,
        "escape": false,
        "eval": false,
        "EvalError": false,
        "Function": false,
        "hasOwnProperty": false,
        "Infinity": false,
        "isFinite": false,
        "isNaN": false,
        "isPrototypeOf": false,
        "JSON": false,
        "Math": false,
        "NaN": false,
        "Number": false,
        "Object": false,
        "parseFloat": false,
        "parseInt": false,
        "propertyIsEnumerable": false,
        "RangeError": false,
        "ReferenceError": false,
        "RegExp": false,
        "String": false,
        "SyntaxError": false,
        "toLocaleString": false,
        "toString": false,
        "TypeError": false,
        "undefined": false,
        "unescape": false,
        "URIError": false,
        "valueOf": false
},
"es6": {
        "Array": false,
        "ArrayBuffer": false,
        "Boolean": false,
        "constructor": false,
        "DataView": false,
        "Date": false,
        "decodeURI": false,
        "decodeURIComponent": false,
        "encodeURI": false,
        "encodeURIComponent": false,
        "Error": false,
        "escape": false,
        "eval": false,
        "EvalError": false,
        "Float32Array": false,
        "Float64Array": false,
        "Function": false,
        "hasOwnProperty": false,
        "Infinity": false,
        "Int16Array": false,
        "Int32Array": false,
        "Int8Array": false,
        "isFinite": false,
        "isNaN": false,
        "isPrototypeOf": false,
        "JSON": false,
        "Map": false,
        "Math": false,
        "NaN": false,
        "Number": false,
        "Object": false,
        "parseFloat": false,
        "parseInt": false,
        "Promise": false,
        "propertyIsEnumerable": false,
        "Proxy": false,
        "RangeError": false,
        "ReferenceError": false,
        "Reflect": false,
        "RegExp": false,
        "Set": false,
        "String": false,
        "Symbol": false,
        "SyntaxError": false,
        "System": false,
        "toLocaleString": false,
        "toString": false,
        "TypeError": false,
        "Uint16Array": false,
        "Uint32Array": false,
        "Uint8Array": false,
        "Uint8ClampedArray": false,
        "undefined": false,
        "unescape": false,
        "URIError": false,
        "valueOf": false,
        "WeakMap": false,
        "WeakSet": false
},
"browser": {
        "addEventListener": false,
        "alert": false,
        "AnalyserNode": false,
        "Animation": false,
        "AnimationEffectReadOnly": false,
        "AnimationEffectTiming": false,
        "AnimationEffectTimingReadOnly": false,
        "AnimationEvent": false,
        "AnimationPlaybackEvent": false,
        "AnimationTimeline": false,
        "applicationCache": false,
        "ApplicationCache": false,
        "ApplicationCacheErrorEvent": false,
        "atob": false,
        "Attr": false,
        "Audio": false,
        "AudioBuffer": false,
        "AudioBufferSourceNode": false,
        "AudioContext": false,
        "AudioDestinationNode": false,
        "AudioListener": false,
        "AudioNode": false,
        "AudioParam": false,
        "AudioProcessingEvent": false,
        "AutocompleteErrorEvent": false,
        "BarProp": false,
        "BatteryManager": false,
        "BeforeUnloadEvent": false,
        "BiquadFilterNode": false,
        "Blob": false,
        "blur": false,
        "btoa": false,
        "Cache": false,
        "caches": false,
        "CacheStorage": false,
        "cancelAnimationFrame": false,
        "CanvasGradient": false,
        "CanvasPattern": false,
        "CanvasRenderingContext2D": false,
        "CDATASection": false,
        "ChannelMergerNode": false,
        "ChannelSplitterNode": false,
        "CharacterData": false,
        "clearInterval": false,
        "clearTimeout": false,
        "clientInformation": false,
        "ClientRect": false,
        "ClientRectList": false,
        "ClipboardEvent": false,
        "close": false,
        "closed": false,
        "CloseEvent": false,
        "Comment": false,
        "CompositionEvent": false,
        "confirm": false,
        "console": false,
        "ConvolverNode": false,
        "Credential": false,
        "CredentialsContainer": false,
        "crypto": false,
        "Crypto": false,
        "CryptoKey": false,
        "CSS": false,
        "CSSAnimation": false,
        "CSSFontFaceRule": false,
        "CSSImportRule": false,
        "CSSKeyframeRule": false,
        "CSSKeyframesRule": false,
        "CSSMediaRule": false,
        "CSSPageRule": false,
        "CSSRule": false,
        "CSSRuleList": false,
        "CSSStyleDeclaration": false,
        "CSSStyleRule": false,
        "CSSStyleSheet": false,
        "CSSSupportsRule": false,
        "CSSTransition": false,
        "CSSUnknownRule": false,
        "CSSViewportRule": false,
        "CustomEvent": false,
        "DataTransfer": false,
        "DataTransferItem": false,
        "DataTransferItemList": false,
        "Debug": false,
        "defaultStatus": false,
        "defaultstatus": false,
        "DelayNode": false,
        "DeviceMotionEvent": false,
        "DeviceOrientationEvent": false,
        "devicePixelRatio": false,
        "dispatchEvent": false,
        "document": false,
        "Document": false,
        "DocumentFragment": false,
        "DocumentTimeline": false,
        "DocumentType": false,
        "DOMError": false,
        "DOMException": false,
        "DOMImplementation": false,
        "DOMParser": false,
        "DOMSettableTokenList": false,
        "DOMStringList": false,
        "DOMStringMap": false,
        "DOMTokenList": false,
        "DragEvent": false,
        "DynamicsCompressorNode": false,
        "Element": false,
        "ElementTimeControl": false,
        "ErrorEvent": false,
        "event": false,
        "Event": false,
        "EventSource": false,
        "EventTarget": false,
        "external": false,
        "FederatedCredential": false,
        "fetch": false,
        "File": false,
        "FileError": false,
        "FileList": false,
        "FileReader": false,
        "find": false,
        "focus": false,
        "FocusEvent": false,
        "FontFace": false,
        "FormData": false,
        "frameElement": false,
        "frames": false,
        "GainNode": false,
        "Gamepad": false,
        "GamepadButton": false,
        "GamepadEvent": false,
        "getComputedStyle": false,
        "getSelection": false,
        "HashChangeEvent": false,
        "Headers": false,
        "history": false,
        "History": false,
        "HTMLAllCollection": false,
        "HTMLAnchorElement": false,
        "HTMLAppletElement": false,
        "HTMLAreaElement": false,
        "HTMLAudioElement": false,
        "HTMLBaseElement": false,
        "HTMLBlockquoteElement": false,
        "HTMLBodyElement": false,
        "HTMLBRElement": false,
        "HTMLButtonElement": false,
        "HTMLCanvasElement": false,
        "HTMLCollection": false,
        "HTMLContentElement": false,
        "HTMLDataListElement": false,
        "HTMLDetailsElement": false,
        "HTMLDialogElement": false,
        "HTMLDirectoryElement": false,
        "HTMLDivElement": false,
        "HTMLDListElement": false,
        "HTMLDocument": false,
        "HTMLElement": false,
        "HTMLEmbedElement": false,
        "HTMLFieldSetElement": false,
        "HTMLFontElement": false,
        "HTMLFormControlsCollection": false,
        "HTMLFormElement": false,
        "HTMLFrameElement": false,
        "HTMLFrameSetElement": false,
        "HTMLHeadElement": false,
        "HTMLHeadingElement": false,
        "HTMLHRElement": false,
        "HTMLHtmlElement": false,
        "HTMLIFrameElement": false,
        "HTMLImageElement": false,
        "HTMLInputElement": false,
        "HTMLIsIndexElement": false,
        "HTMLKeygenElement": false,
        "HTMLLabelElement": false,
        "HTMLLayerElement": false,
        "HTMLLegendElement": false,
        "HTMLLIElement": false,
        "HTMLLinkElement": false,
        "HTMLMapElement": false,
        "HTMLMarqueeElement": false,
        "HTMLMediaElement": false,
        "HTMLMenuElement": false,
        "HTMLMetaElement": false,
        "HTMLMeterElement": false,
        "HTMLModElement": false,
        "HTMLObjectElement": false,
        "HTMLOListElement": false,
        "HTMLOptGroupElement": false,
        "HTMLOptionElement": false,
        "HTMLOptionsCollection": false,
        "HTMLOutputElement": false,
        "HTMLParagraphElement": false,
        "HTMLParamElement": false,
        "HTMLPictureElement": false,
        "HTMLPreElement": false,
        "HTMLProgressElement": false,
        "HTMLQuoteElement": false,
        "HTMLScriptElement": false,
        "HTMLSelectElement": false,
        "HTMLShadowElement": false,
        "HTMLSourceElement": false,
        "HTMLSpanElement": false,
        "HTMLStyleElement": false,
        "HTMLTableCaptionElement": false,
        "HTMLTableCellElement": false,
        "HTMLTableColElement": false,
        "HTMLTableElement": false,
        "HTMLTableRowElement": false,
        "HTMLTableSectionElement": false,
        "HTMLTemplateElement": false,
        "HTMLTextAreaElement": false,
        "HTMLTitleElement": false,
        "HTMLTrackElement": false,
        "HTMLUListElement": false,
        "HTMLUnknownElement": false,
        "HTMLVideoElement": false,
        "IDBCursor": false,
        "IDBCursorWithValue": false,
        "IDBDatabase": false,
        "IDBEnvironment": false,
        "IDBFactory": false,
        "IDBIndex": false,
        "IDBKeyRange": false,
        "IDBObjectStore": false,
        "IDBOpenDBRequest": false,
        "IDBRequest": false,
        "IDBTransaction": false,
        "IDBVersionChangeEvent": false,
        "Image": false,
        "ImageBitmap": false,
        "ImageData": false,
        "indexedDB": false,
        "innerHeight": false,
        "innerWidth": false,
        "InputEvent": false,
        "InputMethodContext": false,
        "IntersectionObserver": false,
        "IntersectionObserverEntry": false,
        "Intl": false,
        "KeyboardEvent": false,
        "KeyframeEffect": false,
        "KeyframeEffectReadOnly": false,
        "length": false,
        "localStorage": false,
        "location": false,
        "Location": false,
        "locationbar": false,
        "matchMedia": false,
        "MediaElementAudioSourceNode": false,
        "MediaEncryptedEvent": false,
        "MediaError": false,
        "MediaKeyError": false,
        "MediaKeyEvent": false,
        "MediaKeyMessageEvent": false,
        "MediaKeys": false,
        "MediaKeySession": false,
        "MediaKeyStatusMap": false,
        "MediaKeySystemAccess": false,
        "MediaList": false,
        "MediaQueryList": false,
        "MediaQueryListEvent": false,
        "MediaSource": false,
        "MediaStream": false,
        "MediaStreamAudioDestinationNode": false,
        "MediaStreamAudioSourceNode": false,
        "MediaStreamEvent": false,
        "MediaStreamTrack": false,
        "menubar": false,
        "MessageChannel": false,
        "MessageEvent": false,
        "MessagePort": false,
        "MIDIAccess": false,
        "MIDIConnectionEvent": false,
        "MIDIInput": false,
        "MIDIInputMap": false,
        "MIDIMessageEvent": false,
        "MIDIOutput": false,
        "MIDIOutputMap": false,
        "MIDIPort": false,
        "MimeType": false,
        "MimeTypeArray": false,
        "MouseEvent": false,
        "moveBy": false,
        "moveTo": false,
        "MutationEvent": false,
        "MutationObserver": false,
        "MutationRecord": false,
        "name": false,
        "NamedNodeMap": false,
        "navigator": false,
        "Navigator": false,
        "Node": false,
        "NodeFilter": false,
        "NodeIterator": false,
        "NodeList": false,
        "Notification": false,
        "OfflineAudioCompletionEvent": false,
        "OfflineAudioContext": false,
        "offscreenBuffering": false,
        "onbeforeunload": true,
        "onblur": true,
        "onerror": true,
        "onfocus": true,
        "onload": true,
        "onresize": true,
        "onunload": true,
        "open": false,
        "openDatabase": false,
        "opener": false,
        "opera": false,
        "Option": false,
        "OscillatorNode": false,
        "outerHeight": false,
        "outerWidth": false,
        "PageTransitionEvent": false,
        "pageXOffset": false,
        "pageYOffset": false,
        "parent": false,
        "PasswordCredential": false,
        "Path2D": false,
        "performance": false,
        "Performance": false,
        "PerformanceEntry": false,
        "PerformanceMark": false,
        "PerformanceMeasure": false,
        "PerformanceNavigation": false,
        "PerformanceResourceTiming": false,
        "PerformanceTiming": false,
        "PeriodicWave": false,
        "Permissions": false,
        "PermissionStatus": false,
        "personalbar": false,
        "Plugin": false,
        "PluginArray": false,
        "PopStateEvent": false,
        "postMessage": false,
        "print": false,
        "ProcessingInstruction": false,
        "ProgressEvent": false,
        "prompt": false,
        "PushManager": false,
        "PushSubscription": false,
        "RadioNodeList": false,
        "Range": false,
        "ReadableByteStream": false,
        "ReadableStream": false,
        "removeEventListener": false,
        "Request": false,
        "requestAnimationFrame": false,
        "resizeBy": false,
        "resizeTo": false,
        "Response": false,
        "RTCIceCandidate": false,
        "RTCSessionDescription": false,
        "RTCPeerConnection": false,
        "screen": false,
        "Screen": false,
        "screenLeft": false,
        "ScreenOrientation": false,
        "screenTop": false,
        "screenX": false,
        "screenY": false,
        "ScriptProcessorNode": false,
        "scroll": false,
        "scrollbars": false,
        "scrollBy": false,
        "scrollTo": false,
        "scrollX": false,
        "scrollY": false,
        "SecurityPolicyViolationEvent": false,
        "Selection": false,
        "self": false,
        "ServiceWorker": false,
        "ServiceWorkerContainer": false,
        "ServiceWorkerRegistration": false,
        "sessionStorage": false,
        "setInterval": false,
        "setTimeout": false,
        "ShadowRoot": false,
        "SharedKeyframeList": false,
        "SharedWorker": false,
        "showModalDialog": false,
        "SiteBoundCredential": false,
        "speechSynthesis": false,
        "SpeechSynthesisEvent": false,
        "SpeechSynthesisUtterance": false,
        "status": false,
        "statusbar": false,
        "stop": false,
        "Storage": false,
        "StorageEvent": false,
        "styleMedia": false,
        "StyleSheet": false,
        "StyleSheetList": false,
        "SubtleCrypto": false,
        "SVGAElement": false,
        "SVGAltGlyphDefElement": false,
        "SVGAltGlyphElement": false,
        "SVGAltGlyphItemElement": false,
        "SVGAngle": false,
        "SVGAnimateColorElement": false,
        "SVGAnimatedAngle": false,
        "SVGAnimatedBoolean": false,
        "SVGAnimatedEnumeration": false,
        "SVGAnimatedInteger": false,
        "SVGAnimatedLength": false,
        "SVGAnimatedLengthList": false,
        "SVGAnimatedNumber": false,
        "SVGAnimatedNumberList": false,
        "SVGAnimatedPathData": false,
        "SVGAnimatedPoints": false,
        "SVGAnimatedPreserveAspectRatio": false,
        "SVGAnimatedRect": false,
        "SVGAnimatedString": false,
        "SVGAnimatedTransformList": false,
        "SVGAnimateElement": false,
        "SVGAnimateMotionElement": false,
        "SVGAnimateTransformElement": false,
        "SVGAnimationElement": false,
        "SVGCircleElement": false,
        "SVGClipPathElement": false,
        "SVGColor": false,
        "SVGColorProfileElement": false,
        "SVGColorProfileRule": false,
        "SVGComponentTransferFunctionElement": false,
        "SVGCSSRule": false,
        "SVGCursorElement": false,
        "SVGDefsElement": false,
        "SVGDescElement": false,
        "SVGDiscardElement": false,
        "SVGDocument": false,
        "SVGElement": false,
        "SVGElementInstance": false,
        "SVGElementInstanceList": false,
        "SVGEllipseElement": false,
        "SVGEvent": false,
        "SVGExternalResourcesRequired": false,
        "SVGFEBlendElement": false,
        "SVGFEColorMatrixElement": false,
        "SVGFEComponentTransferElement": false,
        "SVGFECompositeElement": false,
        "SVGFEConvolveMatrixElement": false,
        "SVGFEDiffuseLightingElement": false,
        "SVGFEDisplacementMapElement": false,
        "SVGFEDistantLightElement": false,
        "SVGFEDropShadowElement": false,
        "SVGFEFloodElement": false,
        "SVGFEFuncAElement": false,
        "SVGFEFuncBElement": false,
        "SVGFEFuncGElement": false,
        "SVGFEFuncRElement": false,
        "SVGFEGaussianBlurElement": false,
        "SVGFEImageElement": false,
        "SVGFEMergeElement": false,
        "SVGFEMergeNodeElement": false,
        "SVGFEMorphologyElement": false,
        "SVGFEOffsetElement": false,
        "SVGFEPointLightElement": false,
        "SVGFESpecularLightingElement": false,
        "SVGFESpotLightElement": false,
        "SVGFETileElement": false,
        "SVGFETurbulenceElement": false,
        "SVGFilterElement": false,
        "SVGFilterPrimitiveStandardAttributes": false,
        "SVGFitToViewBox": false,
        "SVGFontElement": false,
        "SVGFontFaceElement": false,
        "SVGFontFaceFormatElement": false,
        "SVGFontFaceNameElement": false,
        "SVGFontFaceSrcElement": false,
        "SVGFontFaceUriElement": false,
        "SVGForeignObjectElement": false,
        "SVGGElement": false,
        "SVGGeometryElement": false,
        "SVGGlyphElement": false,
        "SVGGlyphRefElement": false,
        "SVGGradientElement": false,
        "SVGGraphicsElement": false,
        "SVGHKernElement": false,
        "SVGICCColor": false,
        "SVGImageElement": false,
        "SVGLangSpace": false,
        "SVGLength": false,
        "SVGLengthList": false,
        "SVGLinearGradientElement": false,
        "SVGLineElement": false,
        "SVGLocatable": false,
        "SVGMarkerElement": false,
        "SVGMaskElement": false,
        "SVGMatrix": false,
        "SVGMetadataElement": false,
        "SVGMissingGlyphElement": false,
        "SVGMPathElement": false,
        "SVGNumber": false,
        "SVGNumberList": false,
        "SVGPaint": false,
        "SVGPathElement": false,
        "SVGPathSeg": false,
        "SVGPathSegArcAbs": false,
        "SVGPathSegArcRel": false,
        "SVGPathSegClosePath": false,
        "SVGPathSegCurvetoCubicAbs": false,
        "SVGPathSegCurvetoCubicRel": false,
        "SVGPathSegCurvetoCubicSmoothAbs": false,
        "SVGPathSegCurvetoCubicSmoothRel": false,
        "SVGPathSegCurvetoQuadraticAbs": false,
        "SVGPathSegCurvetoQuadraticRel": false,
        "SVGPathSegCurvetoQuadraticSmoothAbs": false,
        "SVGPathSegCurvetoQuadraticSmoothRel": false,
        "SVGPathSegLinetoAbs": false,
        "SVGPathSegLinetoHorizontalAbs": false,
        "SVGPathSegLinetoHorizontalRel": false,
        "SVGPathSegLinetoRel": false,
        "SVGPathSegLinetoVerticalAbs": false,
        "SVGPathSegLinetoVerticalRel": false,
        "SVGPathSegList": false,
        "SVGPathSegMovetoAbs": false,
        "SVGPathSegMovetoRel": false,
        "SVGPatternElement": false,
        "SVGPoint": false,
        "SVGPointList": false,
        "SVGPolygonElement": false,
        "SVGPolylineElement": false,
        "SVGPreserveAspectRatio": false,
        "SVGRadialGradientElement": false,
        "SVGRect": false,
        "SVGRectElement": false,
        "SVGRenderingIntent": false,
        "SVGScriptElement": false,
        "SVGSetElement": false,
        "SVGStopElement": false,
        "SVGStringList": false,
        "SVGStylable": false,
        "SVGStyleElement": false,
        "SVGSVGElement": false,
        "SVGSwitchElement": false,
        "SVGSymbolElement": false,
        "SVGTests": false,
        "SVGTextContentElement": false,
        "SVGTextElement": false,
        "SVGTextPathElement": false,
        "SVGTextPositioningElement": false,
        "SVGTitleElement": false,
        "SVGTransform": false,
        "SVGTransformable": false,
        "SVGTransformList": false,
        "SVGTRefElement": false,
        "SVGTSpanElement": false,
        "SVGUnitTypes": false,
        "SVGURIReference": false,
        "SVGUseElement": false,
        "SVGViewElement": false,
        "SVGViewSpec": false,
        "SVGVKernElement": false,
        "SVGZoomAndPan": false,
        "SVGZoomEvent": false,
        "Text": false,
        "TextDecoder": false,
        "TextEncoder": false,
        "TextEvent": false,
        "TextMetrics": false,
        "TextTrack": false,
        "TextTrackCue": false,
        "TextTrackCueList": false,
        "TextTrackList": false,
        "TimeEvent": false,
        "TimeRanges": false,
        "toolbar": false,
        "top": false,
        "Touch": false,
        "TouchEvent": false,
        "TouchList": false,
        "TrackEvent": false,
        "TransitionEvent": false,
        "TreeWalker": false,
        "UIEvent": false,
        "URL": false,
        "URLSearchParams": false,
        "ValidityState": false,
        "VTTCue": false,
        "WaveShaperNode": false,
        "WebGLActiveInfo": false,
        "WebGLBuffer": false,
        "WebGLContextEvent": false,
        "WebGLFramebuffer": false,
        "WebGLProgram": false,
        "WebGLRenderbuffer": false,
        "WebGLRenderingContext": false,
        "WebGLShader": false,
        "WebGLShaderPrecisionFormat": false,
        "WebGLTexture": false,
        "WebGLUniformLocation": false,
        "WebSocket": false,
        "WheelEvent": false,
        "window": false,
        "Window": false,
        "Worker": false,
        "XDomainRequest": false,
        "XMLDocument": false,
        "XMLHttpRequest": false,
        "XMLHttpRequestEventTarget": false,
        "XMLHttpRequestProgressEvent": false,
        "XMLHttpRequestUpload": false,
        "XMLSerializer": false,
        "XPathEvaluator": false,
        "XPathException": false,
        "XPathExpression": false,
        "XPathNamespace": false,
        "XPathNSResolver": false,
        "XPathResult": false,
        "XSLTProcessor": false
},
"worker": {
        "applicationCache": false,
        "atob": false,
        "Blob": false,
        "BroadcastChannel": false,
        "btoa": false,
        "Cache": false,
        "caches": false,
        "clearInterval": false,
        "clearTimeout": false,
        "close": true,
        "console": false,
        "fetch": false,
        "FileReaderSync": false,
        "FormData": false,
        "Headers": false,
        "IDBCursor": false,
        "IDBCursorWithValue": false,
        "IDBDatabase": false,
        "IDBFactory": false,
        "IDBIndex": false,
        "IDBKeyRange": false,
        "IDBObjectStore": false,
        "IDBOpenDBRequest": false,
        "IDBRequest": false,
        "IDBTransaction": false,
        "IDBVersionChangeEvent": false,
        "ImageData": false,
        "importScripts": true,
        "indexedDB": false,
        "location": false,
        "MessageChannel": false,
        "MessagePort": false,
        "name": false,
        "navigator": false,
        "Notification": false,
        "onclose": true,
        "onconnect": true,
        "onerror": true,
        "onlanguagechange": true,
        "onmessage": true,
        "onoffline": true,
        "ononline": true,
        "onrejectionhandled": true,
        "onunhandledrejection": true,
        "performance": false,
        "Performance": false,
        "PerformanceEntry": false,
        "PerformanceMark": false,
        "PerformanceMeasure": false,
        "PerformanceNavigation": false,
        "PerformanceResourceTiming": false,
        "PerformanceTiming": false,
        "postMessage": true,
        "Promise": false,
        "Request": false,
        "Response": false,
        "self": true,
        "ServiceWorkerRegistration": false,
        "setInterval": false,
        "setTimeout": false,
        "TextDecoder": false,
        "TextEncoder": false,
        "URL": false,
        "URLSearchParams": false,
        "WebSocket": false,
        "Worker": false,
        "XMLHttpRequest": false
},
"node": {
        "__dirname": false,
        "__filename": false,
        "arguments": false,
        "Buffer": false,
        "clearImmediate": false,
        "clearInterval": false,
        "clearTimeout": false,
        "console": false,
        "exports": true,
        "GLOBAL": false,
        "global": false,
        "Intl": false,
        "module": false,
        "process": false,
        "require": false,
        "root": false,
        "setImmediate": false,
        "setInterval": false,
        "setTimeout": false
},
"commonjs": {
        "exports": true,
        "module": false,
        "require": false,
        "global": false
},
"amd": {
        "define": false,
        "require": false
},
"mocha": {
        "after": false,
        "afterEach": false,
        "before": false,
        "beforeEach": false,
        "context": false,
        "describe": false,
        "it": false,
        "mocha": false,
        "setup": false,
        "specify": false,
        "suite": false,
        "suiteSetup": false,
        "suiteTeardown": false,
        "teardown": false,
        "test": false,
        "xcontext": false,
        "xdescribe": false,
        "xit": false,
        "xspecify": false
},
"jasmine": {
        "afterAll": false,
        "afterEach": false,
        "beforeAll": false,
        "beforeEach": false,
        "describe": false,
        "expect": false,
        "fail": false,
        "fdescribe": false,
        "fit": false,
        "it": false,
        "jasmine": false,
        "pending": false,
        "runs": false,
        "spyOn": false,
        "waits": false,
        "waitsFor": false,
        "xdescribe": false,
        "xit": false
},
"jest": {
        "afterEach": false,
        "beforeEach": false,
        "check": false,
        "describe": false,
        "expect": false,
        "gen": false,
        "it": false,
        "fit": false,
        "jest": false,
        "pit": false,
        "require": false,
        "xdescribe": false,
        "xit": false
},
"qunit": {
        "asyncTest": false,
        "deepEqual": false,
        "equal": false,
        "expect": false,
        "module": false,
        "notDeepEqual": false,
        "notEqual": false,
        "notOk": false,
        "notPropEqual": false,
        "notStrictEqual": false,
        "ok": false,
        "propEqual": false,
        "QUnit": false,
        "raises": false,
        "start": false,
        "stop": false,
        "strictEqual": false,
        "test": false,
        "throws": false
},
"phantomjs": {
        "console": true,
        "exports": true,
        "phantom": true,
        "require": true,
        "WebPage": true
},
"couch": {
        "emit": false,
        "exports": false,
        "getRow": false,
        "log": false,
        "module": false,
        "provides": false,
        "require": false,
        "respond": false,
        "send": false,
        "start": false,
        "sum": false
},
"rhino": {
        "defineClass": false,
        "deserialize": false,
        "gc": false,
        "help": false,
        "importClass": false,
        "importPackage": false,
        "java": false,
        "load": false,
        "loadClass": false,
        "Packages": false,
        "print": false,
        "quit": false,
        "readFile": false,
        "readUrl": false,
        "runCommand": false,
        "seal": false,
        "serialize": false,
        "spawn": false,
        "sync": false,
        "toint32": false,
        "version": false
},
"nashorn": {
        "__DIR__": false,
        "__FILE__": false,
        "__LINE__": false,
        "com": false,
        "edu": false,
        "exit": false,
        "Java": false,
        "java": false,
        "javafx": false,
        "JavaImporter": false,
        "javax": false,
        "JSAdapter": false,
        "load": false,
        "loadWithNewGlobal": false,
        "org": false,
        "Packages": false,
        "print": false,
        "quit": false
},
"wsh": {
        "ActiveXObject": true,
        "Enumerator": true,
        "GetObject": true,
        "ScriptEngine": true,
        "ScriptEngineBuildVersion": true,
        "ScriptEngineMajorVersion": true,
        "ScriptEngineMinorVersion": true,
        "VBArray": true,
        "WScript": true,
        "WSH": true,
        "XDomainRequest": true
},
"jquery": {
        "$": false,
        "jQuery": false
},
"yui": {
        "Y": false,
        "YUI": false,
        "YUI_config": false
},
"shelljs": {
        "cat": false,
        "cd": false,
        "chmod": false,
        "config": false,
        "cp": false,
        "dirs": false,
        "echo": false,
        "env": false,
        "error": false,
        "exec": false,
        "exit": false,
        "find": false,
        "grep": false,
        "ls": false,
        "ln": false,
        "mkdir": false,
        "mv": false,
        "popd": false,
        "pushd": false,
        "pwd": false,
        "rm": false,
        "sed": false,
        "target": false,
        "tempdir": false,
        "test": false,
        "which": false
},
"prototypejs": {
        "$": false,
        "$$": false,
        "$A": false,
        "$break": false,
        "$continue": false,
        "$F": false,
        "$H": false,
        "$R": false,
        "$w": false,
        "Abstract": false,
        "Ajax": false,
        "Autocompleter": false,
        "Builder": false,
        "Class": false,
        "Control": false,
        "Draggable": false,
        "Draggables": false,
        "Droppables": false,
        "Effect": false,
        "Element": false,
        "Enumerable": false,
        "Event": false,
        "Field": false,
        "Form": false,
        "Hash": false,
        "Insertion": false,
        "ObjectRange": false,
        "PeriodicalExecuter": false,
        "Position": false,
        "Prototype": false,
        "Scriptaculous": false,
        "Selector": false,
        "Sortable": false,
        "SortableObserver": false,
        "Sound": false,
        "Template": false,
        "Toggle": false,
        "Try": false
},
"meteor": {
        "$": false,
        "_": false,
        "Accounts": false,
        "AccountsClient": false,
        "AccountsServer": false,
        "AccountsCommon": false,
        "App": false,
        "Assets": false,
        "Blaze": false,
        "check": false,
        "Cordova": false,
        "DDP": false,
        "DDPServer": false,
        "DDPRateLimiter": false,
        "Deps": false,
        "EJSON": false,
        "Email": false,
        "HTTP": false,
        "Log": false,
        "Match": false,
        "Meteor": false,
        "Mongo": false,
        "MongoInternals": false,
        "Npm": false,
        "Package": false,
        "Plugin": false,
        "process": false,
        "Random": false,
        "ReactiveDict": false,
        "ReactiveVar": false,
        "Router": false,
        "ServiceConfiguration": false,
        "Session": false,
        "share": false,
        "Spacebars": false,
        "Template": false,
        "Tinytest": false,
        "Tracker": false,
        "UI": false,
        "Utils": false,
        "WebApp": false,
        "WebAppInternals": false
},
"mongo": {
        "_isWindows": false,
        "_rand": false,
        "BulkWriteResult": false,
        "cat": false,
        "cd": false,
        "connect": false,
        "db": false,
        "getHostName": false,
        "getMemInfo": false,
        "hostname": false,
        "ISODate": false,
        "listFiles": false,
        "load": false,
        "ls": false,
        "md5sumFile": false,
        "mkdir": false,
        "Mongo": false,
        "NumberInt": false,
        "NumberLong": false,
        "ObjectId": false,
        "PlanCache": false,
        "print": false,
        "printjson": false,
        "pwd": false,
        "quit": false,
        "removeFile": false,
        "rs": false,
        "sh": false,
        "UUID": false,
        "version": false,
        "WriteResult": false
},
"applescript": {
        "$": false,
        "Application": false,
        "Automation": false,
        "console": false,
        "delay": false,
        "Library": false,
        "ObjC": false,
        "ObjectSpecifier": false,
        "Path": false,
        "Progress": false,
        "Ref": false
},
"serviceworker": {
        "caches": false,
        "Cache": false,
        "CacheStorage": false,
        "Client": false,
        "clients": false,
        "Clients": false,
        "ExtendableEvent": false,
        "ExtendableMessageEvent": false,
        "FetchEvent": false,
        "importScripts": false,
        "registration": false,
        "self": false,
        "ServiceWorker": false,
        "ServiceWorkerContainer": false,
        "ServiceWorkerGlobalScope": false,
        "ServiceWorkerMessageEvent": false,
        "ServiceWorkerRegistration": false,
        "skipWaiting": false,
        "WindowClient": false
},
"atomtest": {
        "advanceClock": false,
        "fakeClearInterval": false,
        "fakeClearTimeout": false,
        "fakeSetInterval": false,
        "fakeSetTimeout": false,
        "resetTimeouts": false,
        "waitsForPromise": false
},
"embertest": {
        "andThen": false,
        "click": false,
        "currentPath": false,
        "currentRouteName": false,
        "currentURL": false,
        "fillIn": false,
        "find": false,
        "findWithAssert": false,
        "keyEvent": false,
        "pauseTest": false,
        "triggerEvent": false,
        "visit": false
},
"protractor": {
        "$": false,
        "$$": false,
        "browser": false,
        "By": false,
        "by": false,
        "DartObject": false,
        "element": false,
        "protractor": false
},
"shared-node-browser": {
        "clearInterval": false,
        "clearTimeout": false,
        "console": false,
        "setInterval": false,
        "setTimeout": false
},
"webextensions": {
        "browser": false,
        "chrome": false,
        "opr": false
},
"greasemonkey": {
        "GM_addStyle": false,
        "GM_deleteValue": false,
        "GM_getResourceText": false,
        "GM_getResourceURL": false,
        "GM_getValue": false,
        "GM_info": false,
        "GM_listValues": false,
        "GM_log": false,
        "GM_openInTab": false,
        "GM_registerMenuCommand": false,
        "GM_setClipboard": false,
        "GM_setValue": false,
        "GM_xmlhttpRequest": false,
        "unsafeWindow": false
}

}

},{}],98:[function(require,module,exports){ module.exports = require(‘./globals.json’);

},{“./globals.json”:97}],99:[function(require,module,exports){ if (typeof Object.create === ‘function’) {

// implementation from standard node.js 'util' module
module.exports = function inherits(ctor, superCtor) {
  ctor.super_ = superCtor
  ctor.prototype = Object.create(superCtor.prototype, {
    constructor: {
      value: ctor,
      enumerable: false,
      writable: true,
      configurable: true
    }
  });
};

} else {

// old school shim for old browsers
module.exports = function inherits(ctor, superCtor) {
  ctor.super_ = superCtor
  var TempCtor = function () {}
  TempCtor.prototype = superCtor.prototype
  ctor.prototype = new TempCtor()
  ctor.prototype.constructor = ctor
}

}

},}],100:[function(require,module,exports){ exports[‘date-time’] = /^d{4}-(?:0[0-9]{1}|1[0-2]{1})-[0-9]{2}[tT ]d{2}:d{2}:d{2}(.d+)?([zZ]|[+-]d{2}:d{2})$/ exports[‘date’] = /^d{4}-(?:0[0-9]{1}|1[0-2]{1})-[0-9]{2}$/ exports[‘time’] = /^d{2}:d{2}:d{2}$/ exports[‘email’] = /^S+@S+$/ exports[‘ip-address’] = exports[‘ipv4’] = /^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?).){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/ exports[‘ipv6’] = /^s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:)))(%.+)?s*$/ exports[‘uri’] = /^[a-zA-Z][a-zA-Z0-9+-.]*:[^s]*$/ exports[‘color’] = /(#?([0-9A-Fa-f]{3,6})b)|(aqua)|(black)|(blue)|(fuchsia)|(gray)|(green)|(lime)|(maroon)|(navy)|(olive)|(orange)|(purple)|(red)|(silver)|(teal)|(white)|(yellow)|(rgb(s*b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])bs*,s*b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])bs*,s*b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])bs*))|(rgb(s*(d?d%|100%)+s*,s*(d?d%|100%)+s*,s*(d?d%|100%)+s*))/ exports[‘hostname’] = /^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61)(.([a-zA-Z0-9]|[a-zA-Z0-9-]0,61))*$/ exports = /^[a-zA-Z]+$/ exports = /^[a-zA-Z0-9]+$/ exports = /s*(.+?):s*(+);?/g exports = /^+(?:[0-9] ?)6,14$/ exports = /^[0-9]{1,15}.?[0-9]{0,15}$/

},{}],101:[function(require,module,exports){ var genobj = require(‘generate-object-property’) var genfun = require(‘generate-function’) var jsonpointer = require(‘jsonpointer’) var xtend = require(‘xtend’) var formats = require(‘./formats’)

var get = function(obj, additionalSchemas, ptr) {

var visit = function(sub) {
  if (sub && sub.id === ptr) return sub
  if (typeof sub !== 'object' || !sub) return null
  return Object.keys(sub).reduce(function(res, k) {
    return res || visit(sub[k])
  }, null)
}

var res = visit(obj)
if (res) return res

ptr = ptr.replace(/^#/, '')
ptr = ptr.replace(/\/$/, '')

try {
  return jsonpointer.get(obj, decodeURI(ptr))
} catch (err) {
  var end = ptr.indexOf('#')
  var other
  // external reference
  if (end !== 0) {
    // fragment doesn't exist.
    if (end === -1) {
      other = additionalSchemas[ptr]
    } else {
      var ext = ptr.slice(0, end)
      other = additionalSchemas[ext]
      var fragment = ptr.slice(end).replace(/^#/, '')
      try {
        return jsonpointer.get(other, fragment)
      } catch (err) {}
    }
  } else {
    other = additionalSchemas[ptr]
  }
  return other || null
}

}

var formatName = function(field) {

field = JSON.stringify(field)
var pattern = /\[([^\[\]"]+)\]/
while (pattern.test(field)) field = field.replace(pattern, '."+$1+"')
return field

}

var types = {}

types.any = function() {

return 'true'

}

types.null = function(name) {

return name+' === null'

}

types.boolean = function(name) {

return 'typeof '+name+' === "boolean"'

}

types.array = function(name) {

return 'Array.isArray('+name+')'

}

types.object = function(name) {

return 'typeof '+name+' === "object" && '+name+' && !Array.isArray('+name+')'

}

types.number = function(name) {

return 'typeof '+name+' === "number"'

}

types.integer = function(name) {

return 'typeof '+name+' === "number" && (Math.floor('+name+') === '+name+' || '+name+' > 9007199254740992 || '+name+' < -9007199254740992)'

}

types.string = function(name) {

return 'typeof '+name+' === "string"'

}

var unique = function(array) {

var list = []
for (var i = 0; i < array.length; i++) {
  list.push(typeof array[i] === 'object' ? JSON.stringify(array[i]) : array[i])
}
for (var i = 1; i < list.length; i++) {
  if (list.indexOf(list[i]) !== i) return false
}
return true

}

var isMultipleOf = function(name, multipleOf) {

var res;
var factor = ((multipleOf | 0) !== multipleOf) ? Math.pow(10, multipleOf.toString().split('.').pop().length) : 1
if (factor > 1) {
  var factorName = ((name | 0) !== name) ? Math.pow(10, name.toString().split('.').pop().length) : 1
  if (factorName > factor) res = true
  else res = Math.round(factor * name) % (factor * multipleOf)
}
else res = name % multipleOf;
return !res;

}

var toType = function(node) {

return node.type

}

var compile = function(schema, cache, root, reporter, opts) {

var fmts = opts ? xtend(formats, opts.formats) : formats
var scope = {unique:unique, formats:fmts, isMultipleOf:isMultipleOf}
var verbose = opts ? !!opts.verbose : false;
var greedy = opts && opts.greedy !== undefined ?
  opts.greedy : false;

var syms = {}
var gensym = function(name) {
  return name+(syms[name] = (syms[name] || 0)+1)
}

var reversePatterns = {}
var patterns = function(p) {
  if (reversePatterns[p]) return reversePatterns[p]
  var n = gensym('pattern')
  scope[n] = new RegExp(p)
  reversePatterns[p] = n
  return n
}

var vars = ['i','j','k','l','m','n','o','p','q','r','s','t','u','v','x','y','z']
var genloop = function() {
  var v = vars.shift()
  vars.push(v+v[0])
  return v
}

var visit = function(name, node, reporter, filter) {
  var properties = node.properties
  var type = node.type
  var tuple = false

  if (Array.isArray(node.items)) { // tuple type
    properties = {}
    node.items.forEach(function(item, i) {
      properties[i] = item
    })
    type = 'array'
    tuple = true
  }

  var indent = 0
  var error = function(msg, prop, value) {
    validate('errors++')
    if (reporter === true) {
      validate('if (validate.errors === null) validate.errors = []')
      if (verbose) {
        validate('validate.errors.push({field:%s,message:%s,value:%s,type:%s})', formatName(prop || name), JSON.stringify(msg), value || name, JSON.stringify(type))
      } else {
        validate('validate.errors.push({field:%s,message:%s})', formatName(prop || name), JSON.stringify(msg))
      }
    }
  }

  if (node.required === true) {
    indent++
    validate('if (%s === undefined) {', name)
    error('is required')
    validate('} else {')
  } else {
    indent++
    validate('if (%s !== undefined) {', name)
  }

  var valid = [].concat(type)
    .map(function(t) {
      return types[t || 'any'](name)
    })
    .join(' || ') || 'true'

  if (valid !== 'true') {
    indent++
    validate('if (!(%s)) {', valid)
    error('is the wrong type')
    validate('} else {')
  }

  if (tuple) {
    if (node.additionalItems === false) {
      validate('if (%s.length > %d) {', name, node.items.length)
      error('has additional items')
      validate('}')
    } else if (node.additionalItems) {
      var i = genloop()
      validate('for (var %s = %d; %s < %s.length; %s++) {', i, node.items.length, i, name, i)
      visit(name+'['+i+']', node.additionalItems, reporter, filter)
      validate('}')
    }
  }

  if (node.format && fmts[node.format]) {
    if (type !== 'string' && formats[node.format]) validate('if (%s) {', types.string(name))
    var n = gensym('format')
    scope[n] = fmts[node.format]

    if (typeof scope[n] === 'function') validate('if (!%s(%s)) {', n, name)
    else validate('if (!%s.test(%s)) {', n, name)
    error('must be '+node.format+' format')
    validate('}')
    if (type !== 'string' && formats[node.format]) validate('}')
  }

  if (Array.isArray(node.required)) {
    var isUndefined = function(req) {
      return genobj(name, req) + ' === undefined'
    }

    var checkRequired = function (req) {
      var prop = genobj(name, req);
      validate('if (%s === undefined) {', prop)
      error('is required', prop)
      validate('missing++')
      validate('}')
    }
    validate('if ((%s)) {', type !== 'object' ? types.object(name) : 'true')
    validate('var missing = 0')
    node.required.map(checkRequired)
    validate('}');
    if (!greedy) {
      validate('if (missing === 0) {')
      indent++
    }
  }

  if (node.uniqueItems) {
    if (type !== 'array') validate('if (%s) {', types.array(name))
    validate('if (!(unique(%s))) {', name)
    error('must be unique')
    validate('}')
    if (type !== 'array') validate('}')
  }

  if (node.enum) {
    var complex = node.enum.some(function(e) {
      return typeof e === 'object'
    })

    var compare = complex ?
      function(e) {
        return 'JSON.stringify('+name+')'+' !== JSON.stringify('+JSON.stringify(e)+')'
      } :
      function(e) {
        return name+' !== '+JSON.stringify(e)
      }

    validate('if (%s) {', node.enum.map(compare).join(' && ') || 'false')
    error('must be an enum value')
    validate('}')
  }

  if (node.dependencies) {
    if (type !== 'object') validate('if (%s) {', types.object(name))

    Object.keys(node.dependencies).forEach(function(key) {
      var deps = node.dependencies[key]
      if (typeof deps === 'string') deps = [deps]

      var exists = function(k) {
        return genobj(name, k) + ' !== undefined'
      }

      if (Array.isArray(deps)) {
        validate('if (%s !== undefined && !(%s)) {', genobj(name, key), deps.map(exists).join(' && ') || 'true')
        error('dependencies not set')
        validate('}')
      }
      if (typeof deps === 'object') {
        validate('if (%s !== undefined) {', genobj(name, key))
        visit(name, deps, reporter, filter)
        validate('}')
      }
    })

    if (type !== 'object') validate('}')
  }

  if (node.additionalProperties || node.additionalProperties === false) {
    if (type !== 'object') validate('if (%s) {', types.object(name))

    var i = genloop()
    var keys = gensym('keys')

    var toCompare = function(p) {
      return keys+'['+i+'] !== '+JSON.stringify(p)
    }

    var toTest = function(p) {
      return '!'+patterns(p)+'.test('+keys+'['+i+'])'
    }

    var additionalProp = Object.keys(properties || {}).map(toCompare)
      .concat(Object.keys(node.patternProperties || {}).map(toTest))
      .join(' && ') || 'true'

    validate('var %s = Object.keys(%s)', keys, name)
      ('for (var %s = 0; %s < %s.length; %s++) {', i, i, keys, i)
        ('if (%s) {', additionalProp)

    if (node.additionalProperties === false) {
      if (filter) validate('delete %s', name+'['+keys+'['+i+']]')
      error('has additional properties', null, JSON.stringify(name+'.') + ' + ' + keys + '['+i+']')
    } else {
      visit(name+'['+keys+'['+i+']]', node.additionalProperties, reporter, filter)
    }

    validate
        ('}')
      ('}')

    if (type !== 'object') validate('}')
  }

  if (node.$ref) {
    var sub = get(root, opts && opts.schemas || {}, node.$ref)
    if (sub) {
      var fn = cache[node.$ref]
      if (!fn) {
        cache[node.$ref] = function proxy(data) {
          return fn(data)
        }
        fn = compile(sub, cache, root, false, opts)
      }
      var n = gensym('ref')
      scope[n] = fn
      validate('if (!(%s(%s))) {', n, name)
      error('referenced schema does not match')
      validate('}')
    }
  }

  if (node.not) {
    var prev = gensym('prev')
    validate('var %s = errors', prev)
    visit(name, node.not, false, filter)
    validate('if (%s === errors) {', prev)
    error('negative schema matches')
    validate('} else {')
      ('errors = %s', prev)
    ('}')
  }

  if (node.items && !tuple) {
    if (type !== 'array') validate('if (%s) {', types.array(name))

    var i = genloop()
    validate('for (var %s = 0; %s < %s.length; %s++) {', i, i, name, i)
    visit(name+'['+i+']', node.items, reporter, filter)
    validate('}')

    if (type !== 'array') validate('}')
  }

  if (node.patternProperties) {
    if (type !== 'object') validate('if (%s) {', types.object(name))
    var keys = gensym('keys')
    var i = genloop()
    validate
      ('var %s = Object.keys(%s)', keys, name)
      ('for (var %s = 0; %s < %s.length; %s++) {', i, i, keys, i)

    Object.keys(node.patternProperties).forEach(function(key) {
      var p = patterns(key)
      validate('if (%s.test(%s)) {', p, keys+'['+i+']')
      visit(name+'['+keys+'['+i+']]', node.patternProperties[key], reporter, filter)
      validate('}')
    })

    validate('}')
    if (type !== 'object') validate('}')
  }

  if (node.pattern) {
    var p = patterns(node.pattern)
    if (type !== 'string') validate('if (%s) {', types.string(name))
    validate('if (!(%s.test(%s))) {', p, name)
    error('pattern mismatch')
    validate('}')
    if (type !== 'string') validate('}')
  }

  if (node.allOf) {
    node.allOf.forEach(function(sch) {
      visit(name, sch, reporter, filter)
    })
  }

  if (node.anyOf && node.anyOf.length) {
    var prev = gensym('prev')

    node.anyOf.forEach(function(sch, i) {
      if (i === 0) {
        validate('var %s = errors', prev)
      } else {
        validate('if (errors !== %s) {', prev)
          ('errors = %s', prev)
      }
      visit(name, sch, false, false)
    })
    node.anyOf.forEach(function(sch, i) {
      if (i) validate('}')
    })
    validate('if (%s !== errors) {', prev)
    error('no schemas match')
    validate('}')
  }

  if (node.oneOf && node.oneOf.length) {
    var prev = gensym('prev')
    var passes = gensym('passes')

    validate
      ('var %s = errors', prev)
      ('var %s = 0', passes)

    node.oneOf.forEach(function(sch, i) {
      visit(name, sch, false, false)
      validate('if (%s === errors) {', prev)
        ('%s++', passes)
      ('} else {')
        ('errors = %s', prev)
      ('}')
    })

    validate('if (%s !== 1) {', passes)
    error('no (or more than one) schemas match')
    validate('}')
  }

  if (node.multipleOf !== undefined) {
    if (type !== 'number' && type !== 'integer') validate('if (%s) {', types.number(name))

    validate('if (!isMultipleOf(%s, %d)) {', name, node.multipleOf)

    error('has a remainder')
    validate('}')

    if (type !== 'number' && type !== 'integer') validate('}')
  }

  if (node.maxProperties !== undefined) {
    if (type !== 'object') validate('if (%s) {', types.object(name))

    validate('if (Object.keys(%s).length > %d) {', name, node.maxProperties)
    error('has more properties than allowed')
    validate('}')

    if (type !== 'object') validate('}')
  }

  if (node.minProperties !== undefined) {
    if (type !== 'object') validate('if (%s) {', types.object(name))

    validate('if (Object.keys(%s).length < %d) {', name, node.minProperties)
    error('has less properties than allowed')
    validate('}')

    if (type !== 'object') validate('}')
  }

  if (node.maxItems !== undefined) {
    if (type !== 'array') validate('if (%s) {', types.array(name))

    validate('if (%s.length > %d) {', name, node.maxItems)
    error('has more items than allowed')
    validate('}')

    if (type !== 'array') validate('}')
  }

  if (node.minItems !== undefined) {
    if (type !== 'array') validate('if (%s) {', types.array(name))

    validate('if (%s.length < %d) {', name, node.minItems)
    error('has less items than allowed')
    validate('}')

    if (type !== 'array') validate('}')
  }

  if (node.maxLength !== undefined) {
    if (type !== 'string') validate('if (%s) {', types.string(name))

    validate('if (%s.length > %d) {', name, node.maxLength)
    error('has longer length than allowed')
    validate('}')

    if (type !== 'string') validate('}')
  }

  if (node.minLength !== undefined) {
    if (type !== 'string') validate('if (%s) {', types.string(name))

    validate('if (%s.length < %d) {', name, node.minLength)
    error('has less length than allowed')
    validate('}')

    if (type !== 'string') validate('}')
  }

  if (node.minimum !== undefined) {
    validate('if (%s %s %d) {', name, node.exclusiveMinimum ? '<=' : '<', node.minimum)
    error('is less than minimum')
    validate('}')
  }

  if (node.maximum !== undefined) {
    validate('if (%s %s %d) {', name, node.exclusiveMaximum ? '>=' : '>', node.maximum)
    error('is more than maximum')
    validate('}')
  }

  if (properties) {
    Object.keys(properties).forEach(function(p) {
      if (Array.isArray(type) && type.indexOf('null') !== -1) validate('if (%s !== null) {', name)

      visit(genobj(name, p), properties[p], reporter, filter)

      if (Array.isArray(type) && type.indexOf('null') !== -1) validate('}')
    })
  }

  while (indent--) validate('}')
}

var validate = genfun
  ('function validate(data) {')
    ('validate.errors = null')
    ('var errors = 0')

visit('data', schema, reporter, opts && opts.filter)

validate
    ('return errors === 0')
  ('}')

validate = validate.toFunction(scope)
validate.errors = null

if (Object.defineProperty) {
  Object.defineProperty(validate, 'error', {
    get: function() {
      if (!validate.errors) return ''
      return validate.errors.map(function(err) {
        return err.field + ' ' + err.message;
      }).join('\n')
    }
  })
}

validate.toJSON = function() {
  return schema
}

return validate

}

module.exports = function(schema, opts) {

if (typeof schema === 'string') schema = JSON.parse(schema)
return compile(schema, {}, schema, true, opts)

}

module.exports.filter = function(schema, opts) {

var validate = module.exports(schema, xtend(opts, {filter: true}))
return function(sch) {
  validate(sch)
  return sch
}

}

},{“./formats”:100,“generate-function”:95,“generate-object-property”:96,“jsonpointer”:104,“xtend”:123}],102:[function(require,module,exports){ “use strict” function isProperty(str) {

return /^[$A-Z\_a-z\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0\u08a2-\u08ac\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097f\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d\u0c58\u0c59\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d60\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191c\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19c1-\u19c7\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2e2f\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua697\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua793\ua7a0-\ua7aa\ua7f8-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa80-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc][$A-Z\_a-z\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0\u08a2-\u08ac\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097f\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d\u0c58\u0c59\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d60\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191c\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19c1-\u19c7\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2e2f\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua697\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua793\ua7a0-\ua7aa\ua7f8-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa80-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc0-9\u0300-\u036f\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08e4-\u08fe\u0900-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c01-\u0c03\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c82\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0d02\u0d03\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d82\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19b0-\u19c0\u19c8\u19c9\u19d0-\u19d9\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf2-\u1cf4\u1dc0-\u1de6\u1dfc-\u1dff\u200c\u200d\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua620-\ua629\ua66f\ua674-\ua67d\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua880\ua881\ua8b4-\ua8c4\ua8d0-\ua8d9\ua8e0-\ua8f1\ua900-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f]*$/.test(str)

} module.exports = isProperty },{}],103:[function(require,module,exports){ var toString = {}.toString;

module.exports = Array.isArray || function (arr) {

return toString.call(arr) == '[object Array]';

};

},{}],104:[function(require,module,exports){ var untilde = function(str) {

return str.replace(/~./g, function(m) {
  switch (m) {
    case "~0":
      return "~";
    case "~1":
      return "/";
  }
  throw new Error("Invalid tilde escape: " + m);
});

}

var traverse = function(obj, pointer, value) {

// assert(isArray(pointer))
var part = untilde(pointer.shift());
if(!obj.hasOwnProperty(part)) {
  return null;
}
if(pointer.length !== 0) { // keep traversin!
  return traverse(obj[part], pointer, value);
}
// we're done
if(typeof value === "undefined") {
  // just reading
  return obj[part];
}
// set new value, return old value
var old_value = obj[part];
if(value === null) {
  delete obj[part];
} else {
  obj[part] = value;
}
return old_value;

}

var validate_input = function(obj, pointer) {

if(typeof obj !== "object") {
  throw new Error("Invalid input object.");
}

if(pointer === "") {
  return [];
}

if(!pointer) {
  throw new Error("Invalid JSON pointer.");
}

pointer = pointer.split("/");
var first = pointer.shift();
if (first !== "") {
  throw new Error("Invalid JSON pointer.");
}

return pointer;

}

var get = function(obj, pointer) {

pointer = validate_input(obj, pointer);
if (pointer.length === 0) {
  return obj;
}
return traverse(obj, pointer);

}

var set = function(obj, pointer, value) {

pointer = validate_input(obj, pointer);
if (pointer.length === 0) {
  throw new Error("Invalid JSON pointer for set.")
}
return traverse(obj, pointer, value);

}

exports.get = get exports.set = set

},{}],105:[function(require,module,exports){ // Generated by LiveScript 1.4.0 (function(){

var parsedTypeCheck, types, toString$ = {}.toString;
parsedTypeCheck = require('type-check').parsedTypeCheck;
types = {
  '*': function(value, options){
    switch (toString$.call(value).slice(8, -1)) {
    case 'Array':
      return typeCast(value, {
        type: 'Array'
      }, options);
    case 'Object':
      return typeCast(value, {
        type: 'Object'
      }, options);
    default:
      return {
        type: 'Just',
        value: typesCast(value, [
          {
            type: 'Undefined'
          }, {
            type: 'Null'
          }, {
            type: 'NaN'
          }, {
            type: 'Boolean'
          }, {
            type: 'Number'
          }, {
            type: 'Date'
          }, {
            type: 'RegExp'
          }, {
            type: 'Array'
          }, {
            type: 'Object'
          }, {
            type: 'String'
          }
        ], (options.explicit = true, options))
      };
    }
  },
  Undefined: function(it){
    if (it === 'undefined' || it === void 8) {
      return {
        type: 'Just',
        value: void 8
      };
    } else {
      return {
        type: 'Nothing'
      };
    }
  },
  Null: function(it){
    if (it === 'null') {
      return {
        type: 'Just',
        value: null
      };
    } else {
      return {
        type: 'Nothing'
      };
    }
  },
  NaN: function(it){
    if (it === 'NaN') {
      return {
        type: 'Just',
        value: NaN
      };
    } else {
      return {
        type: 'Nothing'
      };
    }
  },
  Boolean: function(it){
    if (it === 'true') {
      return {
        type: 'Just',
        value: true
      };
    } else if (it === 'false') {
      return {
        type: 'Just',
        value: false
      };
    } else {
      return {
        type: 'Nothing'
      };
    }
  },
  Number: function(it){
    return {
      type: 'Just',
      value: +it
    };
  },
  Int: function(it){
    return {
      type: 'Just',
      value: +it
    };
  },
  Float: function(it){
    return {
      type: 'Just',
      value: +it
    };
  },
  Date: function(value, options){
    var that;
    if (that = /^\#([\s\S]*)\#$/.exec(value)) {
      return {
        type: 'Just',
        value: new Date(+that[1] || that[1])
      };
    } else if (options.explicit) {
      return {
        type: 'Nothing'
      };
    } else {
      return {
        type: 'Just',
        value: new Date(+value || value)
      };
    }
  },
  RegExp: function(value, options){
    var that;
    if (that = /^\/([\s\S]*)\/([gimy]*)$/.exec(value)) {
      return {
        type: 'Just',
        value: new RegExp(that[1], that[2])
      };
    } else if (options.explicit) {
      return {
        type: 'Nothing'
      };
    } else {
      return {
        type: 'Just',
        value: new RegExp(value)
      };
    }
  },
  Array: function(value, options){
    return castArray(value, {
      of: [{
        type: '*'
      }]
    }, options);
  },
  Object: function(value, options){
    return castFields(value, {
      of: {}
    }, options);
  },
  String: function(it){
    var that;
    if (toString$.call(it).slice(8, -1) !== 'String') {
      return {
        type: 'Nothing'
      };
    }
    if (that = it.match(/^'([\s\S]*)'$/)) {
      return {
        type: 'Just',
        value: that[1].replace(/\\'/g, "'")
      };
    } else if (that = it.match(/^"([\s\S]*)"$/)) {
      return {
        type: 'Just',
        value: that[1].replace(/\\"/g, '"')
      };
    } else {
      return {
        type: 'Just',
        value: it
      };
    }
  }
};
function castArray(node, type, options){
  var typeOf, element;
  if (toString$.call(node).slice(8, -1) !== 'Array') {
    return {
      type: 'Nothing'
    };
  }
  typeOf = type.of;
  return {
    type: 'Just',
    value: (function(){
      var i$, ref$, len$, results$ = [];
      for (i$ = 0, len$ = (ref$ = node).length; i$ < len$; ++i$) {
        element = ref$[i$];
        results$.push(typesCast(element, typeOf, options));
      }
      return results$;
    }())
  };
}
function castTuple(node, type, options){
  var result, i, i$, ref$, len$, types, cast;
  if (toString$.call(node).slice(8, -1) !== 'Array') {
    return {
      type: 'Nothing'
    };
  }
  result = [];
  i = 0;
  for (i$ = 0, len$ = (ref$ = type.of).length; i$ < len$; ++i$) {
    types = ref$[i$];
    cast = typesCast(node[i], types, options);
    if (toString$.call(cast).slice(8, -1) !== 'Undefined') {
      result.push(cast);
    }
    i++;
  }
  if (node.length <= i) {
    return {
      type: 'Just',
      value: result
    };
  } else {
    return {
      type: 'Nothing'
    };
  }
}
function castFields(node, type, options){
  var typeOf, key, value;
  if (toString$.call(node).slice(8, -1) !== 'Object') {
    return {
      type: 'Nothing'
    };
  }
  typeOf = type.of;
  return {
    type: 'Just',
    value: (function(){
      var ref$, resultObj$ = {};
      for (key in ref$ = node) {
        value = ref$[key];
        resultObj$[typesCast(key, [{
          type: 'String'
        }], options)] = typesCast(value, typeOf[key] || [{
          type: '*'
        }], options);
      }
      return resultObj$;
    }())
  };
}
function typeCast(node, typeObj, options){
  var type, structure, castFunc, ref$;
  type = typeObj.type, structure = typeObj.structure;
  if (type) {
    castFunc = ((ref$ = options.customTypes[type]) != null ? ref$.cast : void 8) || types[type];
    if (!castFunc) {
      throw new Error("Type not defined: " + type + ".");
    }
    return castFunc(node, options, typesCast);
  } else {
    switch (structure) {
    case 'array':
      return castArray(node, typeObj, options);
    case 'tuple':
      return castTuple(node, typeObj, options);
    case 'fields':
      return castFields(node, typeObj, options);
    }
  }
}
function typesCast(node, types, options){
  var i$, len$, type, ref$, valueType, value;
  for (i$ = 0, len$ = types.length; i$ < len$; ++i$) {
    type = types[i$];
    ref$ = typeCast(node, type, options), valueType = ref$.type, value = ref$.value;
    if (valueType === 'Nothing') {
      continue;
    }
    if (parsedTypeCheck([type], value, {
      customTypes: options.customTypes
    })) {
      return value;
    }
  }
  throw new Error("Value " + JSON.stringify(node) + " does not type check against " + JSON.stringify(types) + ".");
}
module.exports = typesCast;

}).call(this);

},{“type-check”:119}],106:[function(require,module,exports){ // Generated by LiveScript 1.4.0 (function(){

var parseString, cast, parseType, VERSION, parsedTypeParse, parse;
parseString = require('./parse-string');
cast = require('./cast');
parseType = require('type-check').parseType;
VERSION = '0.3.0';
parsedTypeParse = function(parsedType, string, options){
  options == null && (options = {});
  options.explicit == null && (options.explicit = false);
  options.customTypes == null && (options.customTypes = {});
  return cast(parseString(parsedType, string, options), parsedType, options);
};
parse = function(type, string, options){
  return parsedTypeParse(parseType(type), string, options);
};
module.exports = {
  VERSION: VERSION,
  parse: parse,
  parsedTypeParse: parsedTypeParse
};

}).call(this);

},{“./cast”:105,“./parse-string”:107,“type-check”:119}],107:[function(require,module,exports){ // Generated by LiveScript 1.4.0 (function(){

var reject, special, tokenRegex;
reject = require('prelude-ls').reject;
function consumeOp(tokens, op){
  if (tokens[0] === op) {
    return tokens.shift();
  } else {
    throw new Error("Expected '" + op + "', but got '" + tokens[0] + "' instead in " + JSON.stringify(tokens) + ".");
  }
}
function maybeConsumeOp(tokens, op){
  if (tokens[0] === op) {
    return tokens.shift();
  }
}
function consumeList(tokens, arg$, hasDelimiters){
  var open, close, result, untilTest;
  open = arg$[0], close = arg$[1];
  if (hasDelimiters) {
    consumeOp(tokens, open);
  }
  result = [];
  untilTest = "," + (hasDelimiters ? close : '');
  while (tokens.length && (hasDelimiters && tokens[0] !== close)) {
    result.push(consumeElement(tokens, untilTest));
    maybeConsumeOp(tokens, ',');
  }
  if (hasDelimiters) {
    consumeOp(tokens, close);
  }
  return result;
}
function consumeArray(tokens, hasDelimiters){
  return consumeList(tokens, ['[', ']'], hasDelimiters);
}
function consumeTuple(tokens, hasDelimiters){
  return consumeList(tokens, ['(', ')'], hasDelimiters);
}
function consumeFields(tokens, hasDelimiters){
  var result, untilTest, key;
  if (hasDelimiters) {
    consumeOp(tokens, '{');
  }
  result = {};
  untilTest = "," + (hasDelimiters ? '}' : '');
  while (tokens.length && (!hasDelimiters || tokens[0] !== '}')) {
    key = consumeValue(tokens, ':');
    consumeOp(tokens, ':');
    result[key] = consumeElement(tokens, untilTest);
    maybeConsumeOp(tokens, ',');
  }
  if (hasDelimiters) {
    consumeOp(tokens, '}');
  }
  return result;
}
function consumeValue(tokens, untilTest){
  var out;
  untilTest == null && (untilTest = '');
  out = '';
  while (tokens.length && -1 === untilTest.indexOf(tokens[0])) {
    out += tokens.shift();
  }
  return out;
}
function consumeElement(tokens, untilTest){
  switch (tokens[0]) {
  case '[':
    return consumeArray(tokens, true);
  case '(':
    return consumeTuple(tokens, true);
  case '{':
    return consumeFields(tokens, true);
  default:
    return consumeValue(tokens, untilTest);
  }
}
function consumeTopLevel(tokens, types, options){
  var ref$, type, structure, origTokens, result, finalResult, x$, y$;
  ref$ = types[0], type = ref$.type, structure = ref$.structure;
  origTokens = tokens.concat();
  if (!options.explicit && types.length === 1 && ((!type && structure) || (type === 'Array' || type === 'Object'))) {
    result = structure === 'array' || type === 'Array'
      ? consumeArray(tokens, tokens[0] === '[')
      : structure === 'tuple'
        ? consumeTuple(tokens, tokens[0] === '(')
        : consumeFields(tokens, tokens[0] === '{');
    finalResult = tokens.length ? consumeElement(structure === 'array' || type === 'Array'
      ? (x$ = origTokens, x$.unshift('['), x$.push(']'), x$)
      : (y$ = origTokens, y$.unshift('('), y$.push(')'), y$)) : result;
  } else {
    finalResult = consumeElement(tokens);
  }
  return finalResult;
}
special = /\[\]\(\)}{:,/.source;
tokenRegex = RegExp('("(?:\\\\"|[^"])*")|(\'(?:\\\\\'|[^\'])*\')|(/(?:\\\\/|[^/])*/[a-zA-Z]*)|(#.*#)|([' + special + '])|([^\\s' + special + '](?:\\s*[^\\s' + special + ']+)*)|\\s*');
module.exports = function(types, string, options){
  var tokens, node;
  options == null && (options = {});
  if (!options.explicit && types.length === 1 && types[0].type === 'String') {
    return "'" + string.replace(/\\'/g, "\\\\'") + "'";
  }
  tokens = reject(not$, string.split(tokenRegex));
  node = consumeTopLevel(tokens, types, options);
  if (!node) {
    throw new Error("Error parsing '" + string + "'.");
  }
  return node;
};
function not$(x){ return !x; }

}).call(this);

},{“prelude-ls”:116}],108:[function(require,module,exports){ (function (global){ /**

* @license
* lodash <https://lodash.com/>
* Copyright jQuery Foundation and other contributors <https://jquery.org/>
* Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/

;(function() {

/** Used as a safe reference for `undefined` in pre-ES5 environments. */
var undefined;

/** Used as the semantic version number. */
var VERSION = '4.13.1';

/** Used as the size to enable large array optimizations. */
var LARGE_ARRAY_SIZE = 200;

/** Used as the `TypeError` message for "Functions" methods. */
var FUNC_ERROR_TEXT = 'Expected a function';

/** Used to stand-in for `undefined` hash values. */
var HASH_UNDEFINED = '__lodash_hash_undefined__';

/** Used as the internal argument placeholder. */
var PLACEHOLDER = '__lodash_placeholder__';

/** Used to compose bitmasks for wrapper metadata. */
var BIND_FLAG = 1,
    BIND_KEY_FLAG = 2,
    CURRY_BOUND_FLAG = 4,
    CURRY_FLAG = 8,
    CURRY_RIGHT_FLAG = 16,
    PARTIAL_FLAG = 32,
    PARTIAL_RIGHT_FLAG = 64,
    ARY_FLAG = 128,
    REARG_FLAG = 256,
    FLIP_FLAG = 512;

/** Used to compose bitmasks for comparison styles. */
var UNORDERED_COMPARE_FLAG = 1,
    PARTIAL_COMPARE_FLAG = 2;

/** Used as default options for `_.truncate`. */
var DEFAULT_TRUNC_LENGTH = 30,
    DEFAULT_TRUNC_OMISSION = '...';

/** Used to detect hot functions by number of calls within a span of milliseconds. */
var HOT_COUNT = 150,
    HOT_SPAN = 16;

/** Used to indicate the type of lazy iteratees. */
var LAZY_FILTER_FLAG = 1,
    LAZY_MAP_FLAG = 2,
    LAZY_WHILE_FLAG = 3;

/** Used as references for various `Number` constants. */
var INFINITY = 1 / 0,
    MAX_SAFE_INTEGER = 9007199254740991,
    MAX_INTEGER = 1.7976931348623157e+308,
    NAN = 0 / 0;

/** Used as references for the maximum length and index of an array. */
var MAX_ARRAY_LENGTH = 4294967295,
    MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1,
    HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;

/** `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]',
    promiseTag = '[object Promise]',
    regexpTag = '[object RegExp]',
    setTag = '[object Set]',
    stringTag = '[object String]',
    symbolTag = '[object Symbol]',
    weakMapTag = '[object WeakMap]',
    weakSetTag = '[object WeakSet]';

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 match empty string literals in compiled template source. */
var reEmptyStringLeading = /\b__p \+= '';/g,
    reEmptyStringMiddle = /\b(__p \+=) '' \+/g,
    reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g;

/** Used to match HTML entities and HTML characters. */
var reEscapedHtml = /&(?:amp|lt|gt|quot|#39|#96);/g,
    reUnescapedHtml = /[&<>"'`]/g,
    reHasEscapedHtml = RegExp(reEscapedHtml.source),
    reHasUnescapedHtml = RegExp(reUnescapedHtml.source);

/** Used to match template delimiters. */
var reEscape = /<%-([\s\S]+?)%>/g,
    reEvaluate = /<%([\s\S]+?)%>/g,
    reInterpolate = /<%=([\s\S]+?)%>/g;

/** Used to match property names within property paths. */
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
    reIsPlainProp = /^\w*$/,
    rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(\.|\[\])(?:\4|$))/g;

/**
 * Used to match `RegExp`
 * [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns).
 */
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g,
    reHasRegExpChar = RegExp(reRegExpChar.source);

/** Used to match leading and trailing whitespace. */
var reTrim = /^\s+|\s+$/g,
    reTrimStart = /^\s+/,
    reTrimEnd = /\s+$/;

/** Used to match non-compound words composed of alphanumeric characters. */
var reBasicWord = /[a-zA-Z0-9]+/g;

/** Used to match backslashes in property paths. */
var reEscapeChar = /\\(\\)?/g;

/**
 * Used to match
 * [ES template delimiters](http://ecma-international.org/ecma-262/6.0/#sec-template-literal-lexical-components).
 */
var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;

/** Used to match `RegExp` flags from their coerced string values. */
var reFlags = /\w*$/;

/** Used to detect hexadecimal string values. */
var reHasHexPrefix = /^0x/i;

/** Used to detect bad signed hexadecimal string values. */
var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;

/** Used to detect binary string values. */
var reIsBinary = /^0b[01]+$/i;

/** Used to detect host constructors (Safari). */
var reIsHostCtor = /^\[object .+?Constructor\]$/;

/** Used to detect octal string values. */
var reIsOctal = /^0o[0-7]+$/i;

/** Used to detect unsigned integer values. */
var reIsUint = /^(?:0|[1-9]\d*)$/;

/** Used to match latin-1 supplementary letters (excluding mathematical operators). */
var reLatin1 = /[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g;

/** Used to ensure capturing order of template delimiters. */
var reNoMatch = /($^)/;

/** Used to match unescaped characters in compiled string literals. */
var reUnescapedString = /['\n\r\u2028\u2029\\]/g;

/** Used to compose unicode character classes. */
var rsAstralRange = '\\ud800-\\udfff',
    rsComboMarksRange = '\\u0300-\\u036f\\ufe20-\\ufe23',
    rsComboSymbolsRange = '\\u20d0-\\u20f0',
    rsDingbatRange = '\\u2700-\\u27bf',
    rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff',
    rsMathOpRange = '\\xac\\xb1\\xd7\\xf7',
    rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf',
    rsPunctuationRange = '\\u2000-\\u206f',
    rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000',
    rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde',
    rsVarRange = '\\ufe0e\\ufe0f',
    rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;

/** Used to compose unicode capture groups. */
var rsApos = "['\u2019]",
    rsAstral = '[' + rsAstralRange + ']',
    rsBreak = '[' + rsBreakRange + ']',
    rsCombo = '[' + rsComboMarksRange + rsComboSymbolsRange + ']',
    rsDigits = '\\d+',
    rsDingbat = '[' + rsDingbatRange + ']',
    rsLower = '[' + rsLowerRange + ']',
    rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',
    rsFitz = '\\ud83c[\\udffb-\\udfff]',
    rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
    rsNonAstral = '[^' + rsAstralRange + ']',
    rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
    rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
    rsUpper = '[' + rsUpperRange + ']',
    rsZWJ = '\\u200d';

/** Used to compose unicode regexes. */
var rsLowerMisc = '(?:' + rsLower + '|' + rsMisc + ')',
    rsUpperMisc = '(?:' + rsUpper + '|' + rsMisc + ')',
    rsOptLowerContr = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',
    rsOptUpperContr = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',
    reOptMod = rsModifier + '?',
    rsOptVar = '[' + rsVarRange + ']?',
    rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
    rsSeq = rsOptVar + reOptMod + rsOptJoin,
    rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq,
    rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';

/** Used to match apostrophes. */
var reApos = RegExp(rsApos, 'g');

/**
 * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and
 * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).
 */
var reComboMark = RegExp(rsCombo, 'g');

/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
var reComplexSymbol = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');

/** Used to match complex or compound words. */
var reComplexWord = RegExp([
  rsUpper + '?' + rsLower + '+' + rsOptLowerContr + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',
  rsUpperMisc + '+' + rsOptUpperContr + '(?=' + [rsBreak, rsUpper + rsLowerMisc, '$'].join('|') + ')',
  rsUpper + '?' + rsLowerMisc + '+' + rsOptLowerContr,
  rsUpper + '+' + rsOptUpperContr,
  rsDigits,
  rsEmoji
].join('|'), 'g');

/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */
var reHasComplexSymbol = RegExp('[' + rsZWJ + rsAstralRange  + rsComboMarksRange + rsComboSymbolsRange + rsVarRange + ']');

/** Used to detect strings that need a more robust regexp to match words. */
var reHasComplexWord = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;

/** Used to assign default `context` object properties. */
var contextProps = [
  'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array',
  'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object',
  'Promise', 'Reflect', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError',
  'Uint8Array', 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap',
  '_', 'isFinite', 'parseInt', 'setTimeout'
];

/** Used to make template sourceURLs easier to identify. */
var templateCounter = -1;

/** 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 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;

/** Used to map latin-1 supplementary letters to basic latin letters. */
var deburredLetters = {
  '\xc0': 'A',  '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A',
  '\xe0': 'a',  '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a',
  '\xc7': 'C',  '\xe7': 'c',
  '\xd0': 'D',  '\xf0': 'd',
  '\xc8': 'E',  '\xc9': 'E', '\xca': 'E', '\xcb': 'E',
  '\xe8': 'e',  '\xe9': 'e', '\xea': 'e', '\xeb': 'e',
  '\xcC': 'I',  '\xcd': 'I', '\xce': 'I', '\xcf': 'I',
  '\xeC': 'i',  '\xed': 'i', '\xee': 'i', '\xef': 'i',
  '\xd1': 'N',  '\xf1': 'n',
  '\xd2': 'O',  '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O',
  '\xf2': 'o',  '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o',
  '\xd9': 'U',  '\xda': 'U', '\xdb': 'U', '\xdc': 'U',
  '\xf9': 'u',  '\xfa': 'u', '\xfb': 'u', '\xfc': 'u',
  '\xdd': 'Y',  '\xfd': 'y', '\xff': 'y',
  '\xc6': 'Ae', '\xe6': 'ae',
  '\xde': 'Th', '\xfe': 'th',
  '\xdf': 'ss'
};

/** Used to map characters to HTML entities. */
var htmlEscapes = {
  '&': '&amp;',
  '<': '&lt;',
  '>': '&gt;',
  '"': '&quot;',
  "'": '&#39;',
  '`': '&#96;'
};

/** Used to map HTML entities to characters. */
var htmlUnescapes = {
  '&amp;': '&',
  '&lt;': '<',
  '&gt;': '>',
  '&quot;': '"',
  '&#39;': "'",
  '&#96;': '`'
};

/** Used to escape characters for inclusion in compiled string literals. */
var stringEscapes = {
  '\\': '\\',
  "'": "'",
  '\n': 'n',
  '\r': 'r',
  '\u2028': 'u2028',
  '\u2029': 'u2029'
};

/** Built-in method references without a dependency on `root`. */
var freeParseFloat = parseFloat,
    freeParseInt = parseInt;

/** Detect free variable `exports`. */
var freeExports = typeof exports == 'object' && exports;

/** Detect free variable `module`. */
var freeModule = freeExports && typeof module == 'object' && module;

/** Detect the popular CommonJS extension `module.exports`. */
var moduleExports = freeModule && freeModule.exports === freeExports;

/** Detect free variable `global` from Node.js. */
var freeGlobal = checkGlobal(typeof global == 'object' && global);

/** 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')();

/*--------------------------------------------------------------------------*/

/**
 * Adds the key-value `pair` to `map`.
 *
 * @private
 * @param {Object} map The map to modify.
 * @param {Array} pair The key-value pair to add.
 * @returns {Object} Returns `map`.
 */
function addMapEntry(map, pair) {
  // Don't return `Map#set` because it doesn't return the map instance in IE 11.
  map.set(pair[0], pair[1]);
  return map;
}

/**
 * Adds `value` to `set`.
 *
 * @private
 * @param {Object} set The set to modify.
 * @param {*} value The value to add.
 * @returns {Object} Returns `set`.
 */
function addSetEntry(set, value) {
  set.add(value);
  return set;
}

/**
 * A faster alternative to `Function#apply`, this function invokes `func`
 * with the `this` binding of `thisArg` and the arguments of `args`.
 *
 * @private
 * @param {Function} func The function to invoke.
 * @param {*} thisArg The `this` binding of `func`.
 * @param {Array} args The arguments to invoke `func` with.
 * @returns {*} Returns the result of `func`.
 */
function apply(func, thisArg, args) {
  var length = args.length;
  switch (length) {
    case 0: return func.call(thisArg);
    case 1: return func.call(thisArg, args[0]);
    case 2: return func.call(thisArg, args[0], args[1]);
    case 3: return func.call(thisArg, args[0], args[1], args[2]);
  }
  return func.apply(thisArg, args);
}

/**
 * A specialized version of `baseAggregator` for arrays.
 *
 * @private
 * @param {Array} [array] The array to iterate over.
 * @param {Function} setter The function to set `accumulator` values.
 * @param {Function} iteratee The iteratee to transform keys.
 * @param {Object} accumulator The initial aggregated object.
 * @returns {Function} Returns `accumulator`.
 */
function arrayAggregator(array, setter, iteratee, accumulator) {
  var index = -1,
      length = array ? array.length : 0;

  while (++index < length) {
    var value = array[index];
    setter(accumulator, value, iteratee(value), array);
  }
  return accumulator;
}

/**
 * A specialized version of `_.forEach` for arrays without support for
 * iteratee shorthands.
 *
 * @private
 * @param {Array} [array] The array to iterate over.
 * @param {Function} iteratee The function invoked per iteration.
 * @returns {Array} Returns `array`.
 */
function arrayEach(array, iteratee) {
  var index = -1,
      length = array ? array.length : 0;

  while (++index < length) {
    if (iteratee(array[index], index, array) === false) {
      break;
    }
  }
  return array;
}

/**
 * A specialized version of `_.forEachRight` for arrays without support for
 * iteratee shorthands.
 *
 * @private
 * @param {Array} [array] The array to iterate over.
 * @param {Function} iteratee The function invoked per iteration.
 * @returns {Array} Returns `array`.
 */
function arrayEachRight(array, iteratee) {
  var length = array ? array.length : 0;

  while (length--) {
    if (iteratee(array[length], length, array) === false) {
      break;
    }
  }
  return array;
}

/**
 * A specialized version of `_.every` for arrays without support for
 * iteratee shorthands.
 *
 * @private
 * @param {Array} [array] The array to iterate over.
 * @param {Function} predicate The function invoked per iteration.
 * @returns {boolean} Returns `true` if all elements pass the predicate check,
 *  else `false`.
 */
function arrayEvery(array, predicate) {
  var index = -1,
      length = array ? array.length : 0;

  while (++index < length) {
    if (!predicate(array[index], index, array)) {
      return false;
    }
  }
  return true;
}

/**
 * A specialized version of `_.filter` for arrays without support for
 * iteratee shorthands.
 *
 * @private
 * @param {Array} [array] The array to iterate over.
 * @param {Function} predicate The function invoked per iteration.
 * @returns {Array} Returns the new filtered array.
 */
function arrayFilter(array, predicate) {
  var index = -1,
      length = array ? array.length : 0,
      resIndex = 0,
      result = [];

  while (++index < length) {
    var value = array[index];
    if (predicate(value, index, array)) {
      result[resIndex++] = value;
    }
  }
  return result;
}

/**
 * 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;
}

/**
 * This function is like `arrayIncludes` except that it accepts a comparator.
 *
 * @private
 * @param {Array} [array] The array to search.
 * @param {*} target The value to search for.
 * @param {Function} comparator The comparator invoked per element.
 * @returns {boolean} Returns `true` if `target` is found, else `false`.
 */
function arrayIncludesWith(array, value, comparator) {
  var index = -1,
      length = array ? array.length : 0;

  while (++index < length) {
    if (comparator(value, array[index])) {
      return true;
    }
  }
  return false;
}

/**
 * A specialized version of `_.map` for arrays without support for iteratee
 * shorthands.
 *
 * @private
 * @param {Array} [array] The array to iterate over.
 * @param {Function} iteratee The function invoked per iteration.
 * @returns {Array} Returns the new mapped array.
 */
function arrayMap(array, iteratee) {
  var index = -1,
      length = array ? array.length : 0,
      result = Array(length);

  while (++index < length) {
    result[index] = iteratee(array[index], index, array);
  }
  return result;
}

/**
 * Appends the elements of `values` to `array`.
 *
 * @private
 * @param {Array} array The array to modify.
 * @param {Array} values The values to append.
 * @returns {Array} Returns `array`.
 */
function arrayPush(array, values) {
  var index = -1,
      length = values.length,
      offset = array.length;

  while (++index < length) {
    array[offset + index] = values[index];
  }
  return array;
}

/**
 * A specialized version of `_.reduce` for arrays without support for
 * iteratee shorthands.
 *
 * @private
 * @param {Array} [array] The array to iterate over.
 * @param {Function} iteratee The function invoked per iteration.
 * @param {*} [accumulator] The initial value.
 * @param {boolean} [initAccum] Specify using the first element of `array` as
 *  the initial value.
 * @returns {*} Returns the accumulated value.
 */
function arrayReduce(array, iteratee, accumulator, initAccum) {
  var index = -1,
      length = array ? array.length : 0;

  if (initAccum && length) {
    accumulator = array[++index];
  }
  while (++index < length) {
    accumulator = iteratee(accumulator, array[index], index, array);
  }
  return accumulator;
}

/**
 * A specialized version of `_.reduceRight` for arrays without support for
 * iteratee shorthands.
 *
 * @private
 * @param {Array} [array] The array to iterate over.
 * @param {Function} iteratee The function invoked per iteration.
 * @param {*} [accumulator] The initial value.
 * @param {boolean} [initAccum] Specify using the last element of `array` as
 *  the initial value.
 * @returns {*} Returns the accumulated value.
 */
function arrayReduceRight(array, iteratee, accumulator, initAccum) {
  var length = array ? array.length : 0;
  if (initAccum && length) {
    accumulator = array[--length];
  }
  while (length--) {
    accumulator = iteratee(accumulator, array[length], length, array);
  }
  return accumulator;
}

/**
 * A specialized version of `_.some` for arrays without support for iteratee
 * shorthands.
 *
 * @private
 * @param {Array} [array] The array to iterate over.
 * @param {Function} predicate The function invoked per iteration.
 * @returns {boolean} Returns `true` if any element passes the predicate check,
 *  else `false`.
 */
function arraySome(array, predicate) {
  var index = -1,
      length = array ? array.length : 0;

  while (++index < length) {
    if (predicate(array[index], index, array)) {
      return true;
    }
  }
  return false;
}

/**
 * The base implementation of methods like `_.findKey` and `_.findLastKey`,
 * without support for iteratee shorthands, which iterates over `collection`
 * using `eachFunc`.
 *
 * @private
 * @param {Array|Object} collection The collection to search.
 * @param {Function} predicate The function invoked per iteration.
 * @param {Function} eachFunc The function to iterate over `collection`.
 * @returns {*} Returns the found element or its key, else `undefined`.
 */
function baseFindKey(collection, predicate, eachFunc) {
  var result;
  eachFunc(collection, function(value, key, collection) {
    if (predicate(value, key, collection)) {
      result = key;
      return false;
    }
  });
  return result;
}

/**
 * The base implementation of `_.findIndex` and `_.findLastIndex` without
 * support for iteratee shorthands.
 *
 * @private
 * @param {Array} array The array to search.
 * @param {Function} predicate The function invoked per iteration.
 * @param {number} fromIndex The index to search from.
 * @param {boolean} [fromRight] Specify iterating from right to left.
 * @returns {number} Returns the index of the matched value, else `-1`.
 */
function baseFindIndex(array, predicate, fromIndex, fromRight) {
  var length = array.length,
      index = fromIndex + (fromRight ? 1 : -1);

  while ((fromRight ? index-- : ++index < length)) {
    if (predicate(array[index], index, array)) {
      return index;
    }
  }
  return -1;
}

/**
 * The base implementation of `_.indexOf` without `fromIndex` bounds checks.
 *
 * @private
 * @param {Array} array The array to search.
 * @param {*} value The value to search for.
 * @param {number} fromIndex The index to search from.
 * @returns {number} Returns the index of the matched value, else `-1`.
 */
function baseIndexOf(array, value, fromIndex) {
  if (value !== value) {
    return indexOfNaN(array, fromIndex);
  }
  var index = fromIndex - 1,
      length = array.length;

  while (++index < length) {
    if (array[index] === value) {
      return index;
    }
  }
  return -1;
}

/**
 * This function is like `baseIndexOf` except that it accepts a comparator.
 *
 * @private
 * @param {Array} array The array to search.
 * @param {*} value The value to search for.
 * @param {number} fromIndex The index to search from.
 * @param {Function} comparator The comparator invoked per element.
 * @returns {number} Returns the index of the matched value, else `-1`.
 */
function baseIndexOfWith(array, value, fromIndex, comparator) {
  var index = fromIndex - 1,
      length = array.length;

  while (++index < length) {
    if (comparator(array[index], value)) {
      return index;
    }
  }
  return -1;
}

/**
 * The base implementation of `_.mean` and `_.meanBy` without support for
 * iteratee shorthands.
 *
 * @private
 * @param {Array} array The array to iterate over.
 * @param {Function} iteratee The function invoked per iteration.
 * @returns {number} Returns the mean.
 */
function baseMean(array, iteratee) {
  var length = array ? array.length : 0;
  return length ? (baseSum(array, iteratee) / length) : NAN;
}

/**
 * The base implementation of `_.reduce` and `_.reduceRight`, without support
 * for iteratee shorthands, which iterates over `collection` using `eachFunc`.
 *
 * @private
 * @param {Array|Object} collection The collection to iterate over.
 * @param {Function} iteratee The function invoked per iteration.
 * @param {*} accumulator The initial value.
 * @param {boolean} initAccum Specify using the first or last element of
 *  `collection` as the initial value.
 * @param {Function} eachFunc The function to iterate over `collection`.
 * @returns {*} Returns the accumulated value.
 */
function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
  eachFunc(collection, function(value, index, collection) {
    accumulator = initAccum
      ? (initAccum = false, value)
      : iteratee(accumulator, value, index, collection);
  });
  return accumulator;
}

/**
 * The base implementation of `_.sortBy` which uses `comparer` to define the
 * sort order of `array` and replaces criteria objects with their corresponding
 * values.
 *
 * @private
 * @param {Array} array The array to sort.
 * @param {Function} comparer The function to define sort order.
 * @returns {Array} Returns `array`.
 */
function baseSortBy(array, comparer) {
  var length = array.length;

  array.sort(comparer);
  while (length--) {
    array[length] = array[length].value;
  }
  return array;
}

/**
 * The base implementation of `_.sum` and `_.sumBy` without support for
 * iteratee shorthands.
 *
 * @private
 * @param {Array} array The array to iterate over.
 * @param {Function} iteratee The function invoked per iteration.
 * @returns {number} Returns the sum.
 */
function baseSum(array, iteratee) {
  var result,
      index = -1,
      length = array.length;

  while (++index < length) {
    var current = iteratee(array[index]);
    if (current !== undefined) {
      result = result === undefined ? current : (result + current);
    }
  }
  return result;
}

/**
 * The base implementation of `_.times` without support for iteratee shorthands
 * or max array length checks.
 *
 * @private
 * @param {number} n The number of times to invoke `iteratee`.
 * @param {Function} iteratee The function invoked per iteration.
 * @returns {Array} Returns the array of results.
 */
function baseTimes(n, iteratee) {
  var index = -1,
      result = Array(n);

  while (++index < n) {
    result[index] = iteratee(index);
  }
  return result;
}

/**
 * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array
 * of key-value pairs for `object` corresponding to the property names of `props`.
 *
 * @private
 * @param {Object} object The object to query.
 * @param {Array} props The property names to get values for.
 * @returns {Object} Returns the key-value pairs.
 */
function baseToPairs(object, props) {
  return arrayMap(props, function(key) {
    return [key, object[key]];
  });
}

/**
 * The base implementation of `_.unary` without support for storing wrapper metadata.
 *
 * @private
 * @param {Function} func The function to cap arguments for.
 * @returns {Function} Returns the new capped function.
 */
function baseUnary(func) {
  return function(value) {
    return func(value);
  };
}

/**
 * The base implementation of `_.values` and `_.valuesIn` which creates an
 * array of `object` property values corresponding to the property names
 * of `props`.
 *
 * @private
 * @param {Object} object The object to query.
 * @param {Array} props The property names to get values for.
 * @returns {Object} Returns the array of property values.
 */
function baseValues(object, props) {
  return arrayMap(props, function(key) {
    return object[key];
  });
}

/**
 * Checks if a cache value for `key` exists.
 *
 * @private
 * @param {Object} cache The cache to query.
 * @param {string} key The key of the entry to check.
 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
 */
function cacheHas(cache, key) {
  return cache.has(key);
}

/**
 * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol
 * that is not found in the character symbols.
 *
 * @private
 * @param {Array} strSymbols The string symbols to inspect.
 * @param {Array} chrSymbols The character symbols to find.
 * @returns {number} Returns the index of the first unmatched string symbol.
 */
function charsStartIndex(strSymbols, chrSymbols) {
  var index = -1,
      length = strSymbols.length;

  while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
  return index;
}

/**
 * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol
 * that is not found in the character symbols.
 *
 * @private
 * @param {Array} strSymbols The string symbols to inspect.
 * @param {Array} chrSymbols The character symbols to find.
 * @returns {number} Returns the index of the last unmatched string symbol.
 */
function charsEndIndex(strSymbols, chrSymbols) {
  var index = strSymbols.length;

  while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
  return index;
}

/**
 * Checks if `value` is a global object.
 *
 * @private
 * @param {*} value The value to check.
 * @returns {null|Object} Returns `value` if it's a global object, else `null`.
 */
function checkGlobal(value) {
  return (value && value.Object === Object) ? value : null;
}

/**
 * Gets the number of `placeholder` occurrences in `array`.
 *
 * @private
 * @param {Array} array The array to inspect.
 * @param {*} placeholder The placeholder to search for.
 * @returns {number} Returns the placeholder count.
 */
function countHolders(array, placeholder) {
  var length = array.length,
      result = 0;

  while (length--) {
    if (array[length] === placeholder) {
      result++;
    }
  }
  return result;
}

/**
 * Used by `_.deburr` to convert latin-1 supplementary letters to basic latin letters.
 *
 * @private
 * @param {string} letter The matched letter to deburr.
 * @returns {string} Returns the deburred letter.
 */
function deburrLetter(letter) {
  return deburredLetters[letter];
}

/**
 * Used by `_.escape` to convert characters to HTML entities.
 *
 * @private
 * @param {string} chr The matched character to escape.
 * @returns {string} Returns the escaped character.
 */
function escapeHtmlChar(chr) {
  return htmlEscapes[chr];
}

/**
 * Used by `_.template` to escape characters for inclusion in compiled string literals.
 *
 * @private
 * @param {string} chr The matched character to escape.
 * @returns {string} Returns the escaped character.
 */
function escapeStringChar(chr) {
  return '\\' + stringEscapes[chr];
}

/**
 * Gets the value at `key` of `object`.
 *
 * @private
 * @param {Object} [object] The object to query.
 * @param {string} key The key of the property to get.
 * @returns {*} Returns the property value.
 */
function getValue(object, key) {
  return object == null ? undefined : object[key];
}

/**
 * Gets the index at which the first occurrence of `NaN` is found in `array`.
 *
 * @private
 * @param {Array} array The array to search.
 * @param {number} fromIndex The index to search from.
 * @param {boolean} [fromRight] Specify iterating from right to left.
 * @returns {number} Returns the index of the matched `NaN`, else `-1`.
 */
function indexOfNaN(array, fromIndex, fromRight) {
  var length = array.length,
      index = fromIndex + (fromRight ? 1 : -1);

  while ((fromRight ? index-- : ++index < length)) {
    var other = array[index];
    if (other !== other) {
      return index;
    }
  }
  return -1;
}

/**
 * Checks if `value` is a host object in IE < 9.
 *
 * @private
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a host object, else `false`.
 */
function isHostObject(value) {
  // Many host objects are `Object` objects that can coerce to strings
  // despite having improperly defined `toString` methods.
  var result = false;
  if (value != null && typeof value.toString != 'function') {
    try {
      result = !!(value + '');
    } catch (e) {}
  }
  return result;
}

/**
 * Converts `iterator` to an array.
 *
 * @private
 * @param {Object} iterator The iterator to convert.
 * @returns {Array} Returns the converted array.
 */
function iteratorToArray(iterator) {
  var data,
      result = [];

  while (!(data = iterator.next()).done) {
    result.push(data.value);
  }
  return result;
}

/**
 * Converts `map` to its key-value pairs.
 *
 * @private
 * @param {Object} map The map to convert.
 * @returns {Array} Returns the key-value pairs.
 */
function mapToArray(map) {
  var index = -1,
      result = Array(map.size);

  map.forEach(function(value, key) {
    result[++index] = [key, value];
  });
  return result;
}

/**
 * Replaces all `placeholder` elements in `array` with an internal placeholder
 * and returns an array of their indexes.
 *
 * @private
 * @param {Array} array The array to modify.
 * @param {*} placeholder The placeholder to replace.
 * @returns {Array} Returns the new array of placeholder indexes.
 */
function replaceHolders(array, placeholder) {
  var index = -1,
      length = array.length,
      resIndex = 0,
      result = [];

  while (++index < length) {
    var value = array[index];
    if (value === placeholder || value === PLACEHOLDER) {
      array[index] = PLACEHOLDER;
      result[resIndex++] = index;
    }
  }
  return result;
}

/**
 * Converts `set` to an array of its values.
 *
 * @private
 * @param {Object} set The set to convert.
 * @returns {Array} Returns the values.
 */
function setToArray(set) {
  var index = -1,
      result = Array(set.size);

  set.forEach(function(value) {
    result[++index] = value;
  });
  return result;
}

/**
 * Converts `set` to its value-value pairs.
 *
 * @private
 * @param {Object} set The set to convert.
 * @returns {Array} Returns the value-value pairs.
 */
function setToPairs(set) {
  var index = -1,
      result = Array(set.size);

  set.forEach(function(value) {
    result[++index] = [value, value];
  });
  return result;
}

/**
 * Gets the number of symbols in `string`.
 *
 * @private
 * @param {string} string The string to inspect.
 * @returns {number} Returns the string size.
 */
function stringSize(string) {
  if (!(string && reHasComplexSymbol.test(string))) {
    return string.length;
  }
  var result = reComplexSymbol.lastIndex = 0;
  while (reComplexSymbol.test(string)) {
    result++;
  }
  return result;
}

/**
 * Converts `string` to an array.
 *
 * @private
 * @param {string} string The string to convert.
 * @returns {Array} Returns the converted array.
 */
function stringToArray(string) {
  return string.match(reComplexSymbol);
}

/**
 * Used by `_.unescape` to convert HTML entities to characters.
 *
 * @private
 * @param {string} chr The matched character to unescape.
 * @returns {string} Returns the unescaped character.
 */
function unescapeHtmlChar(chr) {
  return htmlUnescapes[chr];
}

/*--------------------------------------------------------------------------*/

/**
 * Create a new pristine `lodash` function using the `context` object.
 *
 * @static
 * @memberOf _
 * @since 1.1.0
 * @category Util
 * @param {Object} [context=root] The context object.
 * @returns {Function} Returns a new `lodash` function.
 * @example
 *
 * _.mixin({ 'foo': _.constant('foo') });
 *
 * var lodash = _.runInContext();
 * lodash.mixin({ 'bar': lodash.constant('bar') });
 *
 * _.isFunction(_.foo);
 * // => true
 * _.isFunction(_.bar);
 * // => false
 *
 * lodash.isFunction(lodash.foo);
 * // => false
 * lodash.isFunction(lodash.bar);
 * // => true
 *
 * // Use `context` to stub `Date#getTime` use in `_.now`.
 * var stubbed = _.runInContext({
 *   'Date': function() {
 *     return { 'getTime': stubGetTime };
 *   }
 * });
 *
 * // Create a suped-up `defer` in Node.js.
 * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer;
 */
function runInContext(context) {
  context = context ? _.defaults({}, context, _.pick(root, contextProps)) : root;

  /** Built-in constructor references. */
  var Date = context.Date,
      Error = context.Error,
      Math = context.Math,
      RegExp = context.RegExp,
      TypeError = context.TypeError;

  /** Used for built-in method references. */
  var arrayProto = context.Array.prototype,
      objectProto = context.Object.prototype,
      stringProto = context.String.prototype;

  /** Used to detect overreaching core-js shims. */
  var coreJsData = context['__core-js_shared__'];

  /** 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) : '';
  }());

  /** Used to resolve the decompiled source of functions. */
  var funcToString = context.Function.prototype.toString;

  /** Used to check objects for own properties. */
  var hasOwnProperty = objectProto.hasOwnProperty;

  /** Used to generate unique IDs. */
  var idCounter = 0;

  /** Used to infer the `Object` constructor. */
  var objectCtorString = funcToString.call(Object);

  /**
   * 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 restore the original `_` reference in `_.noConflict`. */
  var oldDash = root._;

  /** Used to detect if a method is native. */
  var reIsNative = RegExp('^' +
    funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
    .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
  );

  /** Built-in value references. */
  var Buffer = moduleExports ? context.Buffer : undefined,
      Reflect = context.Reflect,
      Symbol = context.Symbol,
      Uint8Array = context.Uint8Array,
      enumerate = Reflect ? Reflect.enumerate : undefined,
      getOwnPropertySymbols = Object.getOwnPropertySymbols,
      iteratorSymbol = typeof (iteratorSymbol = Symbol && Symbol.iterator) == 'symbol' ? iteratorSymbol : undefined,
      objectCreate = Object.create,
      propertyIsEnumerable = objectProto.propertyIsEnumerable,
      splice = arrayProto.splice;

  /** Built-in method references that are mockable. */
  var setTimeout = function(func, wait) { return context.setTimeout.call(root, func, wait); };

  /* Built-in method references for those with the same name as other `lodash` methods. */
  var nativeCeil = Math.ceil,
      nativeFloor = Math.floor,
      nativeGetPrototype = Object.getPrototypeOf,
      nativeIsFinite = context.isFinite,
      nativeJoin = arrayProto.join,
      nativeKeys = Object.keys,
      nativeMax = Math.max,
      nativeMin = Math.min,
      nativeParseInt = context.parseInt,
      nativeRandom = Math.random,
      nativeReplace = stringProto.replace,
      nativeReverse = arrayProto.reverse,
      nativeSplit = stringProto.split;

  /* Built-in method references that are verified to be native. */
  var DataView = getNative(context, 'DataView'),
      Map = getNative(context, 'Map'),
      Promise = getNative(context, 'Promise'),
      Set = getNative(context, 'Set'),
      WeakMap = getNative(context, 'WeakMap'),
      nativeCreate = getNative(Object, 'create');

  /** Used to store function metadata. */
  var metaMap = WeakMap && new WeakMap;

  /** Detect if properties shadowing those on `Object.prototype` are non-enumerable. */
  var nonEnumShadows = !propertyIsEnumerable.call({ 'valueOf': 1 }, 'valueOf');

  /** Used to lookup unminified function names. */
  var realNames = {};

  /** Used to detect maps, sets, and weakmaps. */
  var dataViewCtorString = toSource(DataView),
      mapCtorString = toSource(Map),
      promiseCtorString = toSource(Promise),
      setCtorString = toSource(Set),
      weakMapCtorString = toSource(WeakMap);

  /** Used to convert symbols to primitives and strings. */
  var symbolProto = Symbol ? Symbol.prototype : undefined,
      symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,
      symbolToString = symbolProto ? symbolProto.toString : undefined;

  /*------------------------------------------------------------------------*/

  /**
   * Creates a `lodash` object which wraps `value` to enable implicit method
   * chain sequences. Methods that operate on and return arrays, collections,
   * and functions can be chained together. Methods that retrieve a single value
   * or may return a primitive value will automatically end the chain sequence
   * and return the unwrapped value. Otherwise, the value must be unwrapped
   * with `_#value`.
   *
   * Explicit chain sequences, which must be unwrapped with `_#value`, may be
   * enabled using `_.chain`.
   *
   * The execution of chained methods is lazy, that is, it's deferred until
   * `_#value` is implicitly or explicitly called.
   *
   * Lazy evaluation allows several methods to support shortcut fusion.
   * Shortcut fusion is an optimization to merge iteratee calls; this avoids
   * the creation of intermediate arrays and can greatly reduce the number of
   * iteratee executions. Sections of a chain sequence qualify for shortcut
   * fusion if the section is applied to an array of at least `200` elements
   * and any iteratees accept only one argument. The heuristic for whether a
   * section qualifies for shortcut fusion is subject to change.
   *
   * Chaining is supported in custom builds as long as the `_#value` method is
   * directly or indirectly included in the build.
   *
   * In addition to lodash methods, wrappers have `Array` and `String` methods.
   *
   * The wrapper `Array` methods are:
   * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`
   *
   * The wrapper `String` methods are:
   * `replace` and `split`
   *
   * The wrapper methods that support shortcut fusion are:
   * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,
   * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,
   * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`
   *
   * The chainable wrapper methods are:
   * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,
   * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,
   * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,
   * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,
   * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,
   * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,
   * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,
   * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,
   * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,
   * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,
   * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,
   * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,
   * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,
   * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,
   * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,
   * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,
   * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,
   * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,
   * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,
   * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,
   * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,
   * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,
   * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,
   * `zipObject`, `zipObjectDeep`, and `zipWith`
   *
   * The wrapper methods that are **not** chainable by default are:
   * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,
   * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `deburr`, `divide`, `each`,
   * `eachRight`, `endsWith`, `eq`, `escape`, `escapeRegExp`, `every`, `find`,
   * `findIndex`, `findKey`, `findLast`, `findLastIndex`, `findLastKey`, `first`,
   * `floor`, `forEach`, `forEachRight`, `forIn`, `forInRight`, `forOwn`,
   * `forOwnRight`, `get`, `gt`, `gte`, `has`, `hasIn`, `head`, `identity`,
   * `includes`, `indexOf`, `inRange`, `invoke`, `isArguments`, `isArray`,
   * `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, `isBoolean`,
   * `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`, `isEqualWith`,
   * `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`, `isMap`,
   * `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,
   * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,
   * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,
   * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,
   * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,
   * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,
   * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,
   * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,
   * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,
   * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,
   * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,
   * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,
   * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,
   * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,
   * `upperFirst`, `value`, and `words`
   *
   * @name _
   * @constructor
   * @category Seq
   * @param {*} value The value to wrap in a `lodash` instance.
   * @returns {Object} Returns the new `lodash` wrapper instance.
   * @example
   *
   * function square(n) {
   *   return n * n;
   * }
   *
   * var wrapped = _([1, 2, 3]);
   *
   * // Returns an unwrapped value.
   * wrapped.reduce(_.add);
   * // => 6
   *
   * // Returns a wrapped value.
   * var squares = wrapped.map(square);
   *
   * _.isArray(squares);
   * // => false
   *
   * _.isArray(squares.value());
   * // => true
   */
  function lodash(value) {
    if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
      if (value instanceof LodashWrapper) {
        return value;
      }
      if (hasOwnProperty.call(value, '__wrapped__')) {
        return wrapperClone(value);
      }
    }
    return new LodashWrapper(value);
  }

  /**
   * The function whose prototype chain sequence wrappers inherit from.
   *
   * @private
   */
  function baseLodash() {
    // No operation performed.
  }

  /**
   * The base constructor for creating `lodash` wrapper objects.
   *
   * @private
   * @param {*} value The value to wrap.
   * @param {boolean} [chainAll] Enable explicit method chain sequences.
   */
  function LodashWrapper(value, chainAll) {
    this.__wrapped__ = value;
    this.__actions__ = [];
    this.__chain__ = !!chainAll;
    this.__index__ = 0;
    this.__values__ = undefined;
  }

  /**
   * By default, the template delimiters used by lodash are like those in
   * embedded Ruby (ERB). Change the following template settings to use
   * alternative delimiters.
   *
   * @static
   * @memberOf _
   * @type {Object}
   */
  lodash.templateSettings = {

    /**
     * Used to detect `data` property values to be HTML-escaped.
     *
     * @memberOf _.templateSettings
     * @type {RegExp}
     */
    'escape': reEscape,

    /**
     * Used to detect code to be evaluated.
     *
     * @memberOf _.templateSettings
     * @type {RegExp}
     */
    'evaluate': reEvaluate,

    /**
     * Used to detect `data` property values to inject.
     *
     * @memberOf _.templateSettings
     * @type {RegExp}
     */
    'interpolate': reInterpolate,

    /**
     * Used to reference the data object in the template text.
     *
     * @memberOf _.templateSettings
     * @type {string}
     */
    'variable': '',

    /**
     * Used to import variables into the compiled template.
     *
     * @memberOf _.templateSettings
     * @type {Object}
     */
    'imports': {

      /**
       * A reference to the `lodash` function.
       *
       * @memberOf _.templateSettings.imports
       * @type {Function}
       */
      '_': lodash
    }
  };

  // Ensure wrappers are instances of `baseLodash`.
  lodash.prototype = baseLodash.prototype;
  lodash.prototype.constructor = lodash;

  LodashWrapper.prototype = baseCreate(baseLodash.prototype);
  LodashWrapper.prototype.constructor = LodashWrapper;

  /*------------------------------------------------------------------------*/

  /**
   * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.
   *
   * @private
   * @constructor
   * @param {*} value The value to wrap.
   */
  function LazyWrapper(value) {
    this.__wrapped__ = value;
    this.__actions__ = [];
    this.__dir__ = 1;
    this.__filtered__ = false;
    this.__iteratees__ = [];
    this.__takeCount__ = MAX_ARRAY_LENGTH;
    this.__views__ = [];
  }

  /**
   * Creates a clone of the lazy wrapper object.
   *
   * @private
   * @name clone
   * @memberOf LazyWrapper
   * @returns {Object} Returns the cloned `LazyWrapper` object.
   */
  function lazyClone() {
    var result = new LazyWrapper(this.__wrapped__);
    result.__actions__ = copyArray(this.__actions__);
    result.__dir__ = this.__dir__;
    result.__filtered__ = this.__filtered__;
    result.__iteratees__ = copyArray(this.__iteratees__);
    result.__takeCount__ = this.__takeCount__;
    result.__views__ = copyArray(this.__views__);
    return result;
  }

  /**
   * Reverses the direction of lazy iteration.
   *
   * @private
   * @name reverse
   * @memberOf LazyWrapper
   * @returns {Object} Returns the new reversed `LazyWrapper` object.
   */
  function lazyReverse() {
    if (this.__filtered__) {
      var result = new LazyWrapper(this);
      result.__dir__ = -1;
      result.__filtered__ = true;
    } else {
      result = this.clone();
      result.__dir__ *= -1;
    }
    return result;
  }

  /**
   * Extracts the unwrapped value from its lazy wrapper.
   *
   * @private
   * @name value
   * @memberOf LazyWrapper
   * @returns {*} Returns the unwrapped value.
   */
  function lazyValue() {
    var array = this.__wrapped__.value(),
        dir = this.__dir__,
        isArr = isArray(array),
        isRight = dir < 0,
        arrLength = isArr ? array.length : 0,
        view = getView(0, arrLength, this.__views__),
        start = view.start,
        end = view.end,
        length = end - start,
        index = isRight ? end : (start - 1),
        iteratees = this.__iteratees__,
        iterLength = iteratees.length,
        resIndex = 0,
        takeCount = nativeMin(length, this.__takeCount__);

    if (!isArr || arrLength < LARGE_ARRAY_SIZE ||
        (arrLength == length && takeCount == length)) {
      return baseWrapperValue(array, this.__actions__);
    }
    var result = [];

    outer:
    while (length-- && resIndex < takeCount) {
      index += dir;

      var iterIndex = -1,
          value = array[index];

      while (++iterIndex < iterLength) {
        var data = iteratees[iterIndex],
            iteratee = data.iteratee,
            type = data.type,
            computed = iteratee(value);

        if (type == LAZY_MAP_FLAG) {
          value = computed;
        } else if (!computed) {
          if (type == LAZY_FILTER_FLAG) {
            continue outer;
          } else {
            break outer;
          }
        }
      }
      result[resIndex++] = value;
    }
    return result;
  }

  // Ensure `LazyWrapper` is an instance of `baseLodash`.
  LazyWrapper.prototype = baseCreate(baseLodash.prototype);
  LazyWrapper.prototype.constructor = LazyWrapper;

  /*------------------------------------------------------------------------*/

  /**
   * Creates a hash object.
   *
   * @private
   * @constructor
   * @param {Array} [entries] The key-value pairs to cache.
   */
  function Hash(entries) {
    var index = -1,
        length = entries ? entries.length : 0;

    this.clear();
    while (++index < length) {
      var entry = entries[index];
      this.set(entry[0], entry[1]);
    }
  }

  /**
   * Removes all key-value entries from the hash.
   *
   * @private
   * @name clear
   * @memberOf Hash
   */
  function hashClear() {
    this.__data__ = nativeCreate ? nativeCreate(null) : {};
  }

  /**
   * Removes `key` and its value from the hash.
   *
   * @private
   * @name delete
   * @memberOf Hash
   * @param {Object} hash The hash to modify.
   * @param {string} key The key of the value to remove.
   * @returns {boolean} Returns `true` if the entry was removed, else `false`.
   */
  function hashDelete(key) {
    return this.has(key) && delete this.__data__[key];
  }

  /**
   * 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;
  }

  /**
   * 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);
  }

  /**
   * 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;
  }

  // Add methods to `Hash`.
  Hash.prototype.clear = hashClear;
  Hash.prototype['delete'] = hashDelete;
  Hash.prototype.get = hashGet;
  Hash.prototype.has = hashHas;
  Hash.prototype.set = hashSet;

  /*------------------------------------------------------------------------*/

  /**
   * 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;

    this.clear();
    while (++index < length) {
      var entry = entries[index];
      this.set(entry[0], entry[1]);
    }
  }

  /**
   * Removes all key-value entries from the list cache.
   *
   * @private
   * @name clear
   * @memberOf ListCache
   */
  function listCacheClear() {
    this.__data__ = [];
  }

  /**
   * 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;
  }

  /**
   * 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);

    return index < 0 ? undefined : data[index][1];
  }

  /**
   * 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;
  }

  /**
   * 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);

    if (index < 0) {
      data.push([key, value]);
    } else {
      data[index][1] = value;
    }
    return this;
  }

  // Add methods to `ListCache`.
  ListCache.prototype.clear = listCacheClear;
  ListCache.prototype['delete'] = listCacheDelete;
  ListCache.prototype.get = listCacheGet;
  ListCache.prototype.has = listCacheHas;
  ListCache.prototype.set = listCacheSet;

  /*------------------------------------------------------------------------*/

  /**
   * Creates a map cache object to store key-value pairs.
   *
   * @private
   * @constructor
   * @param {Array} [entries] The key-value pairs to cache.
   */
  function MapCache(entries) {
    var index = -1,
        length = entries ? entries.length : 0;

    this.clear();
    while (++index < length) {
      var entry = entries[index];
      this.set(entry[0], entry[1]);
    }
  }

  /**
   * 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
    };
  }

  /**
   * 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);
  }

  /**
   * 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);
  }

  /**
   * 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);
  }

  /**
   * 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;
  }

  // Add methods to `MapCache`.
  MapCache.prototype.clear = mapCacheClear;
  MapCache.prototype['delete'] = mapCacheDelete;
  MapCache.prototype.get = mapCacheGet;
  MapCache.prototype.has = mapCacheHas;
  MapCache.prototype.set = mapCacheSet;

  /*------------------------------------------------------------------------*/

  /**
   *
   * 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;

    this.__data__ = new MapCache;
    while (++index < length) {
      this.add(values[index]);
    }
  }

  /**
   * Adds `value` to the array cache.
   *
   * @private
   * @name add
   * @memberOf SetCache
   * @alias push
   * @param {*} value The value to cache.
   * @returns {Object} Returns the cache instance.
   */
  function setCacheAdd(value) {
    this.__data__.set(value, HASH_UNDEFINED);
    return this;
  }

  /**
   * Checks if `value` is in the array cache.
   *
   * @private
   * @name has
   * @memberOf SetCache
   * @param {*} value The value to search for.
   * @returns {number} Returns `true` if `value` is found, else `false`.
   */
  function setCacheHas(value) {
    return this.__data__.has(value);
  }

  // Add methods to `SetCache`.
  SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
  SetCache.prototype.has = setCacheHas;

  /*------------------------------------------------------------------------*/

  /**
   * 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);
  }

  /**
   * Removes all key-value entries from the stack.
   *
   * @private
   * @name clear
   * @memberOf Stack
   */
  function stackClear() {
    this.__data__ = new ListCache;
  }

  /**
   * Removes `key` and its value from the stack.
   *
   * @private
   * @name delete
   * @memberOf Stack
   * @param {string} key The key of the value to remove.
   * @returns {boolean} Returns `true` if the entry was removed, else `false`.
   */
  function stackDelete(key) {
    return this.__data__['delete'](key);
  }

  /**
   * Gets the stack value for `key`.
   *
   * @private
   * @name get
   * @memberOf Stack
   * @param {string} key The key of the value to get.
   * @returns {*} Returns the entry value.
   */
  function stackGet(key) {
    return this.__data__.get(key);
  }

  /**
   * Checks if a stack value for `key` exists.
   *
   * @private
   * @name has
   * @memberOf Stack
   * @param {string} key The key of the entry to check.
   * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
   */
  function stackHas(key) {
    return this.__data__.has(key);
  }

  /**
   * 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;
  }

  // Add methods to `Stack`.
  Stack.prototype.clear = stackClear;
  Stack.prototype['delete'] = stackDelete;
  Stack.prototype.get = stackGet;
  Stack.prototype.has = stackHas;
  Stack.prototype.set = stackSet;

  /*------------------------------------------------------------------------*/

  /**
   * 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;
  }

  /**
   * This function is like `assignValue` except that it doesn't assign
   * `undefined` values.
   *
   * @private
   * @param {Object} object The object to modify.
   * @param {string} key The key of the property to assign.
   * @param {*} value The value to assign.
   */
  function assignMergeValue(object, key, value) {
    if ((value !== undefined && !eq(object[key], value)) ||
        (typeof key == 'number' && value === undefined && !(key in object))) {
      object[key] = value;
    }
  }

  /**
   * 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;
    }
  }

  /**
   * 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;
  }

  /**
   * Aggregates elements of `collection` on `accumulator` with keys transformed
   * by `iteratee` and values set by `setter`.
   *
   * @private
   * @param {Array|Object} collection The collection to iterate over.
   * @param {Function} setter The function to set `accumulator` values.
   * @param {Function} iteratee The iteratee to transform keys.
   * @param {Object} accumulator The initial aggregated object.
   * @returns {Function} Returns `accumulator`.
   */
  function baseAggregator(collection, setter, iteratee, accumulator) {
    baseEach(collection, function(value, key, collection) {
      setter(accumulator, value, iteratee(value), collection);
    });
    return accumulator;
  }

  /**
   * 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);
  }

  /**
   * The base implementation of `_.at` without support for individual paths.
   *
   * @private
   * @param {Object} object The object to iterate over.
   * @param {string[]} paths The property paths of elements to pick.
   * @returns {Array} Returns the picked elements.
   */
  function baseAt(object, paths) {
    var index = -1,
        isNil = object == null,
        length = paths.length,
        result = Array(length);

    while (++index < length) {
      result[index] = isNil ? undefined : get(object, paths[index]);
    }
    return result;
  }

  /**
   * The base implementation of `_.clamp` which doesn't coerce arguments to numbers.
   *
   * @private
   * @param {number} number The number to clamp.
   * @param {number} [lower] The lower bound.
   * @param {number} upper The upper bound.
   * @returns {number} Returns the clamped number.
   */
  function baseClamp(number, lower, upper) {
    if (number === number) {
      if (upper !== undefined) {
        number = number <= upper ? number : upper;
      }
      if (lower !== undefined) {
        number = number >= lower ? number : lower;
      }
    }
    return number;
  }

  /**
   * 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;

      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);

    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;
  }

  /**
   * The base implementation of `_.conforms` which doesn't clone `source`.
   *
   * @private
   * @param {Object} source The object of property predicates to conform to.
   * @returns {Function} Returns the new spec function.
   */
  function baseConforms(source) {
    var props = keys(source),
        length = props.length;

    return function(object) {
      if (object == null) {
        return !length;
      }
      var index = length;
      while (index--) {
        var key = props[index],
            predicate = source[key],
            value = object[key];

        if ((value === undefined &&
            !(key in Object(object))) || !predicate(value)) {
          return false;
        }
      }
      return true;
    };
  }

  /**
   * 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) : {};
  }

  /**
   * The base implementation of `_.delay` and `_.defer` which accepts an array
   * of `func` arguments.
   *
   * @private
   * @param {Function} func The function to delay.
   * @param {number} wait The number of milliseconds to delay invocation.
   * @param {Object} args The arguments to provide to `func`.
   * @returns {number} Returns the timer id.
   */
  function baseDelay(func, wait, args) {
    if (typeof func != 'function') {
      throw new TypeError(FUNC_ERROR_TEXT);
    }
    return setTimeout(function() { func.apply(undefined, args); }, wait);
  }

  /**
   * The base implementation of methods like `_.difference` without support
   * for excluding multiple arrays or iteratee shorthands.
   *
   * @private
   * @param {Array} array The array to inspect.
   * @param {Array} values The values to exclude.
   * @param {Function} [iteratee] The iteratee invoked per element.
   * @param {Function} [comparator] The comparator invoked per element.
   * @returns {Array} Returns the new array of filtered values.
   */
  function baseDifference(array, values, iteratee, comparator) {
    var index = -1,
        includes = arrayIncludes,
        isCommon = true,
        length = array.length,
        result = [],
        valuesLength = values.length;

    if (!length) {
      return result;
    }
    if (iteratee) {
      values = arrayMap(values, baseUnary(iteratee));
    }
    if (comparator) {
      includes = arrayIncludesWith;
      isCommon = false;
    }
    else if (values.length >= LARGE_ARRAY_SIZE) {
      includes = cacheHas;
      isCommon = false;
      values = new SetCache(values);
    }
    outer:
    while (++index < length) {
      var value = array[index],
          computed = iteratee ? iteratee(value) : value;

      value = (comparator || value !== 0) ? value : 0;
      if (isCommon && computed === computed) {
        var valuesIndex = valuesLength;
        while (valuesIndex--) {
          if (values[valuesIndex] === computed) {
            continue outer;
          }
        }
        result.push(value);
      }
      else if (!includes(values, computed, comparator)) {
        result.push(value);
      }
    }
    return result;
  }

  /**
   * 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);

  /**
   * The base implementation of `_.forEachRight` 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 baseEachRight = createBaseEach(baseForOwnRight, true);

  /**
   * The base implementation of `_.every` without support for iteratee shorthands.
   *
   * @private
   * @param {Array|Object} collection The collection to iterate over.
   * @param {Function} predicate The function invoked per iteration.
   * @returns {boolean} Returns `true` if all elements pass the predicate check,
   *  else `false`
   */
  function baseEvery(collection, predicate) {
    var result = true;
    baseEach(collection, function(value, index, collection) {
      result = !!predicate(value, index, collection);
      return result;
    });
    return result;
  }

  /**
   * The base implementation of methods like `_.max` and `_.min` which accepts a
   * `comparator` to determine the extremum value.
   *
   * @private
   * @param {Array} array The array to iterate over.
   * @param {Function} iteratee The iteratee invoked per iteration.
   * @param {Function} comparator The comparator used to compare values.
   * @returns {*} Returns the extremum value.
   */
  function baseExtremum(array, iteratee, comparator) {
    var index = -1,
        length = array.length;

    while (++index < length) {
      var value = array[index],
          current = iteratee(value);

      if (current != null && (computed === undefined
            ? (current === current && !isSymbol(current))
            : comparator(current, computed)
          )) {
        var computed = current,
            result = value;
      }
    }
    return result;
  }

  /**
   * The base implementation of `_.fill` without an iteratee call guard.
   *
   * @private
   * @param {Array} array The array to fill.
   * @param {*} value The value to fill `array` with.
   * @param {number} [start=0] The start position.
   * @param {number} [end=array.length] The end position.
   * @returns {Array} Returns `array`.
   */
  function baseFill(array, value, start, end) {
    var length = array.length;

    start = toInteger(start);
    if (start < 0) {
      start = -start > length ? 0 : (length + start);
    }
    end = (end === undefined || end > length) ? length : toInteger(end);
    if (end < 0) {
      end += length;
    }
    end = start > end ? 0 : toLength(end);
    while (start < end) {
      array[start++] = value;
    }
    return array;
  }

  /**
   * The base implementation of `_.filter` without support for iteratee shorthands.
   *
   * @private
   * @param {Array|Object} collection The collection to iterate over.
   * @param {Function} predicate The function invoked per iteration.
   * @returns {Array} Returns the new filtered array.
   */
  function baseFilter(collection, predicate) {
    var result = [];
    baseEach(collection, function(value, index, collection) {
      if (predicate(value, index, collection)) {
        result.push(value);
      }
    });
    return result;
  }

  /**
   * The base implementation of `_.flatten` with support for restricting flattening.
   *
   * @private
   * @param {Array} array The array to flatten.
   * @param {number} depth The maximum recursion depth.
   * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.
   * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.
   * @param {Array} [result=[]] The initial result value.
   * @returns {Array} Returns the new flattened array.
   */
  function baseFlatten(array, depth, predicate, isStrict, result) {
    var index = -1,
        length = array.length;

    predicate || (predicate = isFlattenable);
    result || (result = []);

    while (++index < length) {
      var value = array[index];
      if (depth > 0 && predicate(value)) {
        if (depth > 1) {
          // Recursively flatten arrays (susceptible to call stack limits).
          baseFlatten(value, depth - 1, predicate, isStrict, result);
        } else {
          arrayPush(result, value);
        }
      } else if (!isStrict) {
        result[result.length] = value;
      }
    }
    return result;
  }

  /**
   * 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();

  /**
   * This function is like `baseFor` except that it iterates over properties
   * in the opposite order.
   *
   * @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 baseForRight = createBaseFor(true);

  /**
   * The base implementation of `_.forOwn` without support for iteratee shorthands.
   *
   * @private
   * @param {Object} object The object to iterate over.
   * @param {Function} iteratee The function invoked per iteration.
   * @returns {Object} Returns `object`.
   */
  function baseForOwn(object, iteratee) {
    return object && baseFor(object, iteratee, keys);
  }

  /**
   * The base implementation of `_.forOwnRight` 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 baseForOwnRight(object, iteratee) {
    return object && baseForRight(object, iteratee, keys);
  }

  /**
   * The base implementation of `_.functions` which creates an array of
   * `object` function property names filtered from `props`.
   *
   * @private
   * @param {Object} object The object to inspect.
   * @param {Array} props The property names to filter.
   * @returns {Array} Returns the function names.
   */
  function baseFunctions(object, props) {
    return arrayFilter(props, function(key) {
      return isFunction(object[key]);
    });
  }

  /**
   * The base implementation of `_.get` without support for default values.
   *
   * @private
   * @param {Object} object The object to query.
   * @param {Array|string} path The path of the property to get.
   * @returns {*} Returns the resolved value.
   */
  function baseGet(object, path) {
    path = isKey(path, object) ? [path] : castPath(path);

    var index = 0,
        length = path.length;

    while (object != null && index < length) {
      object = object[toKey(path[index++])];
    }
    return (index && index == length) ? object : undefined;
  }

  /**
   * 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));
  }

  /**
   * The base implementation of `_.gt` which doesn't coerce arguments to numbers.
   *
   * @private
   * @param {*} value The value to compare.
   * @param {*} other The other value to compare.
   * @returns {boolean} Returns `true` if `value` is greater than `other`,
   *  else `false`.
   */
  function baseGt(value, other) {
    return value > other;
  }

  /**
   * 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));
  }

  /**
   * The base implementation of `_.hasIn` 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 baseHasIn(object, key) {
    return object != null && key in Object(object);
  }

  /**
   * The base implementation of `_.inRange` which doesn't coerce arguments to numbers.
   *
   * @private
   * @param {number} number The number to check.
   * @param {number} start The start of the range.
   * @param {number} end The end of the range.
   * @returns {boolean} Returns `true` if `number` is in the range, else `false`.
   */
  function baseInRange(number, start, end) {
    return number >= nativeMin(start, end) && number < nativeMax(start, end);
  }

  /**
   * The base implementation of methods like `_.intersection`, without support
   * for iteratee shorthands, that accepts an array of arrays to inspect.
   *
   * @private
   * @param {Array} arrays The arrays to inspect.
   * @param {Function} [iteratee] The iteratee invoked per element.
   * @param {Function} [comparator] The comparator invoked per element.
   * @returns {Array} Returns the new array of shared values.
   */
  function baseIntersection(arrays, iteratee, comparator) {
    var includes = comparator ? arrayIncludesWith : arrayIncludes,
        length = arrays[0].length,
        othLength = arrays.length,
        othIndex = othLength,
        caches = Array(othLength),
        maxLength = Infinity,
        result = [];

    while (othIndex--) {
      var array = arrays[othIndex];
      if (othIndex && iteratee) {
        array = arrayMap(array, baseUnary(iteratee));
      }
      maxLength = nativeMin(array.length, maxLength);
      caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))
        ? new SetCache(othIndex && array)
        : undefined;
    }
    array = arrays[0];

    var index = -1,
        seen = caches[0];

    outer:
    while (++index < length && result.length < maxLength) {
      var value = array[index],
          computed = iteratee ? iteratee(value) : value;

      value = (comparator || value !== 0) ? value : 0;
      if (!(seen
            ? cacheHas(seen, computed)
            : includes(result, computed, comparator)
          )) {
        othIndex = othLength;
        while (--othIndex) {
          var cache = caches[othIndex];
          if (!(cache
                ? cacheHas(cache, computed)
                : includes(arrays[othIndex], computed, comparator))
              ) {
            continue outer;
          }
        }
        if (seen) {
          seen.push(computed);
        }
        result.push(value);
      }
    }
    return result;
  }

  /**
   * The base implementation of `_.invert` and `_.invertBy` which inverts
   * `object` with values transformed by `iteratee` and set by `setter`.
   *
   * @private
   * @param {Object} object The object to iterate over.
   * @param {Function} setter The function to set `accumulator` values.
   * @param {Function} iteratee The iteratee to transform values.
   * @param {Object} accumulator The initial inverted object.
   * @returns {Function} Returns `accumulator`.
   */
  function baseInverter(object, setter, iteratee, accumulator) {
    baseForOwn(object, function(value, key, object) {
      setter(accumulator, iteratee(value), key, object);
    });
    return accumulator;
  }

  /**
   * The base implementation of `_.invoke` without support for individual
   * method arguments.
   *
   * @private
   * @param {Object} object The object to query.
   * @param {Array|string} path The path of the method to invoke.
   * @param {Array} args The arguments to invoke the method with.
   * @returns {*} Returns the result of the invoked method.
   */
  function baseInvoke(object, path, args) {
    if (!isKey(path, object)) {
      path = castPath(path);
      object = parent(object, path);
      path = last(path);
    }
    var func = object == null ? object : object[toKey(path)];
    return func == null ? undefined : apply(func, object, args);
  }

  /**
   * 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);
  }

  /**
   * A specialized version of `baseIsEqual` for arrays and objects which performs
   * deep comparisons and tracks traversed objects enabling objects with circular
   * references to be compared.
   *
   * @private
   * @param {Object} object The object to compare.
   * @param {Object} other The other object to compare.
   * @param {Function} equalFunc The function to determine equivalents of values.
   * @param {Function} [customizer] The function to customize comparisons.
   * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual`
   *  for more details.
   * @param {Object} [stack] Tracks traversed `object` and `other` objects.
   * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
   */
  function baseIsEqualDeep(object, other, equalFunc, customizer, bitmask, stack) {
    var objIsArr = isArray(object),
        othIsArr = isArray(other),
        objTag = arrayTag,
        othTag = arrayTag;

    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;

    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__');

      if (objIsWrapped || othIsWrapped) {
        var objUnwrapped = objIsWrapped ? object.value() : object,
            othUnwrapped = othIsWrapped ? other.value() : other;

        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);
  }

  /**
   * 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;

    if (object == null) {
      return !length;
    }
    object = Object(object);
    while (index--) {
      var data = matchData[index];
      if ((noCustomizer && data[2])
            ? data[1] !== object[data[0]]
            : !(data[0] in object)
          ) {
        return false;
      }
    }
    while (++index < length) {
      data = matchData[index];
      var key = data[0],
          objValue = object[key],
          srcValue = data[1];

      if (noCustomizer && data[2]) {
        if (objValue === undefined && !(key in object)) {
          return false;
        }
      } else {
        var stack = new Stack;
        if (customizer) {
          var result = customizer(objValue, srcValue, key, object, source, stack);
        }
        if (!(result === undefined
              ? baseIsEqual(srcValue, objValue, customizer, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG, stack)
              : result
            )) {
          return false;
        }
      }
    }
    return true;
  }

  /**
   * 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));
  }

  /**
   * 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);
  }

  /**
   * The base implementation of `_.keys` 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 baseKeys(object) {
    return nativeKeys(Object(object));
  }

  /**
   * 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;
  }

  // Fallback for IE < 9 with es6-shim.
  if (enumerate && !propertyIsEnumerable.call({ 'valueOf': 1 }, 'valueOf')) {
    baseKeysIn = function(object) {
      return iteratorToArray(enumerate(object));
    };
  }

  /**
   * The base implementation of `_.lt` which doesn't coerce arguments to numbers.
   *
   * @private
   * @param {*} value The value to compare.
   * @param {*} other The other value to compare.
   * @returns {boolean} Returns `true` if `value` is less than `other`,
   *  else `false`.
   */
  function baseLt(value, other) {
    return value < other;
  }

  /**
   * The base implementation of `_.map` 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} Returns the new mapped array.
   */
  function baseMap(collection, iteratee) {
    var index = -1,
        result = isArrayLike(collection) ? Array(collection.length) : [];

    baseEach(collection, function(value, key, collection) {
      result[++index] = iteratee(value, key, collection);
    });
    return result;
  }

  /**
   * 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);
    };
  }

  /**
   * 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);
    };
  }

  /**
   * The base implementation of `_.merge` without support for multiple sources.
   *
   * @private
   * @param {Object} object The destination object.
   * @param {Object} source The source object.
   * @param {number} srcIndex The index of `source`.
   * @param {Function} [customizer] The function to customize merged values.
   * @param {Object} [stack] Tracks traversed source values and their merged
   *  counterparts.
   */
  function baseMerge(object, source, srcIndex, customizer, stack) {
    if (object === source) {
      return;
    }
    if (!(isArray(source) || isTypedArray(source))) {
      var props = keysIn(source);
    }
    arrayEach(props || source, function(srcValue, key) {
      if (props) {
        key = srcValue;
        srcValue = source[key];
      }
      if (isObject(srcValue)) {
        stack || (stack = new Stack);
        baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
      }
      else {
        var newValue = customizer
          ? customizer(object[key], srcValue, (key + ''), object, source, stack)
          : undefined;

        if (newValue === undefined) {
          newValue = srcValue;
        }
        assignMergeValue(object, key, newValue);
      }
    });
  }

  /**
   * A specialized version of `baseMerge` for arrays and objects which performs
   * deep merges and tracks traversed objects enabling objects with circular
   * references to be merged.
   *
   * @private
   * @param {Object} object The destination object.
   * @param {Object} source The source object.
   * @param {string} key The key of the value to merge.
   * @param {number} srcIndex The index of `source`.
   * @param {Function} mergeFunc The function to merge values.
   * @param {Function} [customizer] The function to customize assigned values.
   * @param {Object} [stack] Tracks traversed source values and their merged
   *  counterparts.
   */
  function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
    var objValue = object[key],
        srcValue = source[key],
        stacked = stack.get(srcValue);

    if (stacked) {
      assignMergeValue(object, key, stacked);
      return;
    }
    var newValue = customizer
      ? customizer(objValue, srcValue, (key + ''), object, source, stack)
      : undefined;

    var isCommon = newValue === undefined;

    if (isCommon) {
      newValue = srcValue;
      if (isArray(srcValue) || isTypedArray(srcValue)) {
        if (isArray(objValue)) {
          newValue = objValue;
        }
        else if (isArrayLikeObject(objValue)) {
          newValue = copyArray(objValue);
        }
        else {
          isCommon = false;
          newValue = baseClone(srcValue, true);
        }
      }
      else if (isPlainObject(srcValue) || isArguments(srcValue)) {
        if (isArguments(objValue)) {
          newValue = toPlainObject(objValue);
        }
        else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) {
          isCommon = false;
          newValue = baseClone(srcValue, true);
        }
        else {
          newValue = objValue;
        }
      }
      else {
        isCommon = false;
      }
    }
    stack.set(srcValue, newValue);

    if (isCommon) {
      // Recursively merge objects and arrays (susceptible to call stack limits).
      mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
    }
    stack['delete'](srcValue);
    assignMergeValue(object, key, newValue);
  }

  /**
   * The base implementation of `_.nth` which doesn't coerce `n` to an integer.
   *
   * @private
   * @param {Array} array The array to query.
   * @param {number} n The index of the element to return.
   * @returns {*} Returns the nth element of `array`.
   */
  function baseNth(array, n) {
    var length = array.length;
    if (!length) {
      return;
    }
    n += n < 0 ? length : 0;
    return isIndex(n, length) ? array[n] : undefined;
  }

  /**
   * The base implementation of `_.orderBy` without param guards.
   *
   * @private
   * @param {Array|Object} collection The collection to iterate over.
   * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.
   * @param {string[]} orders The sort orders of `iteratees`.
   * @returns {Array} Returns the new sorted array.
   */
  function baseOrderBy(collection, iteratees, orders) {
    var index = -1;
    iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(getIteratee()));

    var result = baseMap(collection, function(value, key, collection) {
      var criteria = arrayMap(iteratees, function(iteratee) {
        return iteratee(value);
      });
      return { 'criteria': criteria, 'index': ++index, 'value': value };
    });

    return baseSortBy(result, function(object, other) {
      return compareMultiple(object, other, orders);
    });
  }

  /**
   * The base implementation of `_.pick` without support for individual
   * property identifiers.
   *
   * @private
   * @param {Object} object The source object.
   * @param {string[]} props The property identifiers to pick.
   * @returns {Object} Returns the new object.
   */
  function basePick(object, props) {
    object = Object(object);
    return arrayReduce(props, function(result, key) {
      if (key in object) {
        result[key] = object[key];
      }
      return result;
    }, {});
  }

  /**
   * The base implementation of  `_.pickBy` without support for iteratee shorthands.
   *
   * @private
   * @param {Object} object The source object.
   * @param {Function} predicate The function invoked per property.
   * @returns {Object} Returns the new object.
   */
  function basePickBy(object, predicate) {
    var index = -1,
        props = getAllKeysIn(object),
        length = props.length,
        result = {};

    while (++index < length) {
      var key = props[index],
          value = object[key];

      if (predicate(value, key)) {
        result[key] = value;
      }
    }
    return result;
  }

  /**
   * The base implementation of `_.property` without support for deep paths.
   *
   * @private
   * @param {string} key The key of the property to get.
   * @returns {Function} Returns the new accessor function.
   */
  function baseProperty(key) {
    return function(object) {
      return object == null ? undefined : object[key];
    };
  }

  /**
   * 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);
    };
  }

  /**
   * The base implementation of `_.pullAllBy` without support for iteratee
   * shorthands.
   *
   * @private
   * @param {Array} array The array to modify.
   * @param {Array} values The values to remove.
   * @param {Function} [iteratee] The iteratee invoked per element.
   * @param {Function} [comparator] The comparator invoked per element.
   * @returns {Array} Returns `array`.
   */
  function basePullAll(array, values, iteratee, comparator) {
    var indexOf = comparator ? baseIndexOfWith : baseIndexOf,
        index = -1,
        length = values.length,
        seen = array;

    if (array === values) {
      values = copyArray(values);
    }
    if (iteratee) {
      seen = arrayMap(array, baseUnary(iteratee));
    }
    while (++index < length) {
      var fromIndex = 0,
          value = values[index],
          computed = iteratee ? iteratee(value) : value;

      while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) {
        if (seen !== array) {
          splice.call(seen, fromIndex, 1);
        }
        splice.call(array, fromIndex, 1);
      }
    }
    return array;
  }

  /**
   * The base implementation of `_.pullAt` without support for individual
   * indexes or capturing the removed elements.
   *
   * @private
   * @param {Array} array The array to modify.
   * @param {number[]} indexes The indexes of elements to remove.
   * @returns {Array} Returns `array`.
   */
  function basePullAt(array, indexes) {
    var length = array ? indexes.length : 0,
        lastIndex = length - 1;

    while (length--) {
      var index = indexes[length];
      if (length == lastIndex || index !== previous) {
        var previous = index;
        if (isIndex(index)) {
          splice.call(array, index, 1);
        }
        else if (!isKey(index, array)) {
          var path = castPath(index),
              object = parent(array, path);

          if (object != null) {
            delete object[toKey(last(path))];
          }
        }
        else {
          delete array[toKey(index)];
        }
      }
    }
    return array;
  }

  /**
   * The base implementation of `_.random` without support for returning
   * floating-point numbers.
   *
   * @private
   * @param {number} lower The lower bound.
   * @param {number} upper The upper bound.
   * @returns {number} Returns the random number.
   */
  function baseRandom(lower, upper) {
    return lower + nativeFloor(nativeRandom() * (upper - lower + 1));
  }

  /**
   * The base implementation of `_.range` and `_.rangeRight` which doesn't
   * coerce arguments to numbers.
   *
   * @private
   * @param {number} start The start of the range.
   * @param {number} end The end of the range.
   * @param {number} step The value to increment or decrement by.
   * @param {boolean} [fromRight] Specify iterating from right to left.
   * @returns {Array} Returns the range of numbers.
   */
  function baseRange(start, end, step, fromRight) {
    var index = -1,
        length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),
        result = Array(length);

    while (length--) {
      result[fromRight ? length : ++index] = start;
      start += step;
    }
    return result;
  }

  /**
   * The base implementation of `_.repeat` which doesn't coerce arguments.
   *
   * @private
   * @param {string} string The string to repeat.
   * @param {number} n The number of times to repeat the string.
   * @returns {string} Returns the repeated string.
   */
  function baseRepeat(string, n) {
    var result = '';
    if (!string || n < 1 || n > MAX_SAFE_INTEGER) {
      return result;
    }
    // Leverage the exponentiation by squaring algorithm for a faster repeat.
    // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.
    do {
      if (n % 2) {
        result += string;
      }
      n = nativeFloor(n / 2);
      if (n) {
        string += string;
      }
    } while (n);

    return result;
  }

  /**
   * The base implementation of `_.set`.
   *
   * @private
   * @param {Object} object The object to query.
   * @param {Array|string} path The path of the property to set.
   * @param {*} value The value to set.
   * @param {Function} [customizer] The function to customize path creation.
   * @returns {Object} Returns `object`.
   */
  function baseSet(object, path, value, customizer) {
    path = isKey(path, object) ? [path] : castPath(path);

    var index = -1,
        length = path.length,
        lastIndex = length - 1,
        nested = object;

    while (nested != null && ++index < length) {
      var key = toKey(path[index]);
      if (isObject(nested)) {
        var newValue = value;
        if (index != lastIndex) {
          var objValue = nested[key];
          newValue = customizer ? customizer(objValue, key, nested) : undefined;
          if (newValue === undefined) {
            newValue = objValue == null
              ? (isIndex(path[index + 1]) ? [] : {})
              : objValue;
          }
        }
        assignValue(nested, key, newValue);
      }
      nested = nested[key];
    }
    return object;
  }

  /**
   * The base implementation of `setData` without support for hot loop detection.
   *
   * @private
   * @param {Function} func The function to associate metadata with.
   * @param {*} data The metadata.
   * @returns {Function} Returns `func`.
   */
  var baseSetData = !metaMap ? identity : function(func, data) {
    metaMap.set(func, data);
    return func;
  };

  /**
   * The base implementation of `_.slice` without an iteratee call guard.
   *
   * @private
   * @param {Array} array The array to slice.
   * @param {number} [start=0] The start position.
   * @param {number} [end=array.length] The end position.
   * @returns {Array} Returns the slice of `array`.
   */
  function baseSlice(array, start, end) {
    var index = -1,
        length = array.length;

    if (start < 0) {
      start = -start > length ? 0 : (length + start);
    }
    end = end > length ? length : end;
    if (end < 0) {
      end += length;
    }
    length = start > end ? 0 : ((end - start) >>> 0);
    start >>>= 0;

    var result = Array(length);
    while (++index < length) {
      result[index] = array[index + start];
    }
    return result;
  }

  /**
   * The base implementation of `_.some` without support for iteratee shorthands.
   *
   * @private
   * @param {Array|Object} collection The collection to iterate over.
   * @param {Function} predicate The function invoked per iteration.
   * @returns {boolean} Returns `true` if any element passes the predicate check,
   *  else `false`.
   */
  function baseSome(collection, predicate) {
    var result;

    baseEach(collection, function(value, index, collection) {
      result = predicate(value, index, collection);
      return !result;
    });
    return !!result;
  }

  /**
   * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which
   * performs a binary search of `array` to determine the index at which `value`
   * should be inserted into `array` in order to maintain its sort order.
   *
   * @private
   * @param {Array} array The sorted array to inspect.
   * @param {*} value The value to evaluate.
   * @param {boolean} [retHighest] Specify returning the highest qualified index.
   * @returns {number} Returns the index at which `value` should be inserted
   *  into `array`.
   */
  function baseSortedIndex(array, value, retHighest) {
    var low = 0,
        high = array ? array.length : low;

    if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {
      while (low < high) {
        var mid = (low + high) >>> 1,
            computed = array[mid];

        if (computed !== null && !isSymbol(computed) &&
            (retHighest ? (computed <= value) : (computed < value))) {
          low = mid + 1;
        } else {
          high = mid;
        }
      }
      return high;
    }
    return baseSortedIndexBy(array, value, identity, retHighest);
  }

  /**
   * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy`
   * which invokes `iteratee` for `value` and each element of `array` to compute
   * their sort ranking. The iteratee is invoked with one argument; (value).
   *
   * @private
   * @param {Array} array The sorted array to inspect.
   * @param {*} value The value to evaluate.
   * @param {Function} iteratee The iteratee invoked per element.
   * @param {boolean} [retHighest] Specify returning the highest qualified index.
   * @returns {number} Returns the index at which `value` should be inserted
   *  into `array`.
   */
  function baseSortedIndexBy(array, value, iteratee, retHighest) {
    value = iteratee(value);

    var low = 0,
        high = array ? array.length : 0,
        valIsNaN = value !== value,
        valIsNull = value === null,
        valIsSymbol = isSymbol(value),
        valIsUndefined = value === undefined;

    while (low < high) {
      var mid = nativeFloor((low + high) / 2),
          computed = iteratee(array[mid]),
          othIsDefined = computed !== undefined,
          othIsNull = computed === null,
          othIsReflexive = computed === computed,
          othIsSymbol = isSymbol(computed);

      if (valIsNaN) {
        var setLow = retHighest || othIsReflexive;
      } else if (valIsUndefined) {
        setLow = othIsReflexive && (retHighest || othIsDefined);
      } else if (valIsNull) {
        setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);
      } else if (valIsSymbol) {
        setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);
      } else if (othIsNull || othIsSymbol) {
        setLow = false;
      } else {
        setLow = retHighest ? (computed <= value) : (computed < value);
      }
      if (setLow) {
        low = mid + 1;
      } else {
        high = mid;
      }
    }
    return nativeMin(high, MAX_ARRAY_INDEX);
  }

  /**
   * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without
   * support for iteratee shorthands.
   *
   * @private
   * @param {Array} array The array to inspect.
   * @param {Function} [iteratee] The iteratee invoked per element.
   * @returns {Array} Returns the new duplicate free array.
   */
  function baseSortedUniq(array, iteratee) {
    var index = -1,
        length = array.length,
        resIndex = 0,
        result = [];

    while (++index < length) {
      var value = array[index],
          computed = iteratee ? iteratee(value) : value;

      if (!index || !eq(computed, seen)) {
        var seen = computed;
        result[resIndex++] = value === 0 ? 0 : value;
      }
    }
    return result;
  }

  /**
   * The base implementation of `_.toNumber` which doesn't ensure correct
   * conversions of binary, hexadecimal, or octal string values.
   *
   * @private
   * @param {*} value The value to process.
   * @returns {number} Returns the number.
   */
  function baseToNumber(value) {
    if (typeof value == 'number') {
      return value;
    }
    if (isSymbol(value)) {
      return NAN;
    }
    return +value;
  }

  /**
   * 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;
  }

  /**
   * 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;

    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;

      value = (comparator || value !== 0) ? value : 0;
      if (isCommon && computed === computed) {
        var seenIndex = seen.length;
        while (seenIndex--) {
          if (seen[seenIndex] === computed) {
            continue outer;
          }
        }
        if (iteratee) {
          seen.push(computed);
        }
        result.push(value);
      }
      else if (!includes(seen, computed, comparator)) {
        if (seen !== result) {
          seen.push(computed);
        }
        result.push(value);
      }
    }
    return result;
  }

  /**
   * The base implementation of `_.unset`.
   *
   * @private
   * @param {Object} object The object to modify.
   * @param {Array|string} path The path of the property to unset.
   * @returns {boolean} Returns `true` if the property is deleted, else `false`.
   */
  function baseUnset(object, path) {
    path = isKey(path, object) ? [path] : castPath(path);
    object = parent(object, path);

    var key = toKey(last(path));
    return !(object != null && baseHas(object, key)) || delete object[key];
  }

  /**
   * The base implementation of `_.update`.
   *
   * @private
   * @param {Object} object The object to query.
   * @param {Array|string} path The path of the property to update.
   * @param {Function} updater The function to produce the updated value.
   * @param {Function} [customizer] The function to customize path creation.
   * @returns {Object} Returns `object`.
   */
  function baseUpdate(object, path, updater, customizer) {
    return baseSet(object, path, updater(baseGet(object, path)), customizer);
  }

  /**
   * The base implementation of methods like `_.dropWhile` and `_.takeWhile`
   * without support for iteratee shorthands.
   *
   * @private
   * @param {Array} array The array to query.
   * @param {Function} predicate The function invoked per iteration.
   * @param {boolean} [isDrop] Specify dropping elements instead of taking them.
   * @param {boolean} [fromRight] Specify iterating from right to left.
   * @returns {Array} Returns the slice of `array`.
   */
  function baseWhile(array, predicate, isDrop, fromRight) {
    var length = array.length,
        index = fromRight ? length : -1;

    while ((fromRight ? index-- : ++index < length) &&
      predicate(array[index], index, array)) {}

    return isDrop
      ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length))
      : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index));
  }

  /**
   * The base implementation of `wrapperValue` which returns the result of
   * performing a sequence of actions on the unwrapped `value`, where each
   * successive action is supplied the return value of the previous.
   *
   * @private
   * @param {*} value The unwrapped value.
   * @param {Array} actions Actions to perform to resolve the unwrapped value.
   * @returns {*} Returns the resolved value.
   */
  function baseWrapperValue(value, actions) {
    var result = value;
    if (result instanceof LazyWrapper) {
      result = result.value();
    }
    return arrayReduce(actions, function(result, action) {
      return action.func.apply(action.thisArg, arrayPush([result], action.args));
    }, result);
  }

  /**
   * The base implementation of methods like `_.xor`, without support for
   * iteratee shorthands, that accepts an array of arrays to inspect.
   *
   * @private
   * @param {Array} arrays The arrays to inspect.
   * @param {Function} [iteratee] The iteratee invoked per element.
   * @param {Function} [comparator] The comparator invoked per element.
   * @returns {Array} Returns the new array of values.
   */
  function baseXor(arrays, iteratee, comparator) {
    var index = -1,
        length = arrays.length;

    while (++index < length) {
      var result = result
        ? arrayPush(
            baseDifference(result, arrays[index], iteratee, comparator),
            baseDifference(arrays[index], result, iteratee, comparator)
          )
        : arrays[index];
    }
    return (result && result.length) ? baseUniq(result, iteratee, comparator) : [];
  }

  /**
   * This base implementation of `_.zipObject` which assigns values using `assignFunc`.
   *
   * @private
   * @param {Array} props The property identifiers.
   * @param {Array} values The property values.
   * @param {Function} assignFunc The function to assign values.
   * @returns {Object} Returns the new object.
   */
  function baseZipObject(props, values, assignFunc) {
    var index = -1,
        length = props.length,
        valsLength = values.length,
        result = {};

    while (++index < length) {
      var value = index < valsLength ? values[index] : undefined;
      assignFunc(result, props[index], value);
    }
    return result;
  }

  /**
   * Casts `value` to an empty array if it's not an array like object.
   *
   * @private
   * @param {*} value The value to inspect.
   * @returns {Array|Object} Returns the cast array-like object.
   */
  function castArrayLikeObject(value) {
    return isArrayLikeObject(value) ? value : [];
  }

  /**
   * Casts `value` to `identity` if it's not a function.
   *
   * @private
   * @param {*} value The value to inspect.
   * @returns {Function} Returns cast function.
   */
  function castFunction(value) {
    return typeof value == 'function' ? value : identity;
  }

  /**
   * 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);
  }

  /**
   * Casts `array` to a slice if it's needed.
   *
   * @private
   * @param {Array} array The array to inspect.
   * @param {number} start The start position.
   * @param {number} [end=array.length] The end position.
   * @returns {Array} Returns the cast slice.
   */
  function castSlice(array, start, end) {
    var length = array.length;
    end = end === undefined ? length : end;
    return (!start && end >= length) ? array : baseSlice(array, start, end);
  }

  /**
   * Creates a clone of  `buffer`.
   *
   * @private
   * @param {Buffer} buffer The buffer to clone.
   * @param {boolean} [isDeep] Specify a deep clone.
   * @returns {Buffer} Returns the cloned buffer.
   */
  function cloneBuffer(buffer, isDeep) {
    if (isDeep) {
      return buffer.slice();
    }
    var result = new buffer.constructor(buffer.length);
    buffer.copy(result);
    return result;
  }

  /**
   * 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;
  }

  /**
   * 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);
  }

  /**
   * 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);
  }

  /**
   * Creates a clone of `regexp`.
   *
   * @private
   * @param {Object} regexp The regexp to clone.
   * @returns {Object} Returns the cloned regexp.
   */
  function cloneRegExp(regexp) {
    var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
    result.lastIndex = regexp.lastIndex;
    return result;
  }

  /**
   * 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);
  }

  /**
   * 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)) : {};
  }

  /**
   * 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);
  }

  /**
   * Compares values to sort them in ascending order.
   *
   * @private
   * @param {*} value The value to compare.
   * @param {*} other The other value to compare.
   * @returns {number} Returns the sort order indicator for `value`.
   */
  function compareAscending(value, other) {
    if (value !== other) {
      var valIsDefined = value !== undefined,
          valIsNull = value === null,
          valIsReflexive = value === value,
          valIsSymbol = isSymbol(value);

      var othIsDefined = other !== undefined,
          othIsNull = other === null,
          othIsReflexive = other === other,
          othIsSymbol = isSymbol(other);

      if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||
          (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||
          (valIsNull && othIsDefined && othIsReflexive) ||
          (!valIsDefined && othIsReflexive) ||
          !valIsReflexive) {
        return 1;
      }
      if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||
          (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||
          (othIsNull && valIsDefined && valIsReflexive) ||
          (!othIsDefined && valIsReflexive) ||
          !othIsReflexive) {
        return -1;
      }
    }
    return 0;
  }

  /**
   * Used by `_.orderBy` to compare multiple properties of a value to another
   * and stable sort them.
   *
   * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,
   * specify an order of "desc" for descending or "asc" for ascending sort order
   * of corresponding values.
   *
   * @private
   * @param {Object} object The object to compare.
   * @param {Object} other The other object to compare.
   * @param {boolean[]|string[]} orders The order to sort by for each property.
   * @returns {number} Returns the sort order indicator for `object`.
   */
  function compareMultiple(object, other, orders) {
    var index = -1,
        objCriteria = object.criteria,
        othCriteria = other.criteria,
        length = objCriteria.length,
        ordersLength = orders.length;

    while (++index < length) {
      var result = compareAscending(objCriteria[index], othCriteria[index]);
      if (result) {
        if (index >= ordersLength) {
          return result;
        }
        var order = orders[index];
        return result * (order == 'desc' ? -1 : 1);
      }
    }
    // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications
    // that causes it, under certain circumstances, to provide the same value for
    // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247
    // for more details.
    //
    // This also ensures a stable sort in V8 and other engines.
    // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.
    return object.index - other.index;
  }

  /**
   * Creates an array that is the composition of partially applied arguments,
   * placeholders, and provided arguments into a single array of arguments.
   *
   * @private
   * @param {Array} args The provided arguments.
   * @param {Array} partials The arguments to prepend to those provided.
   * @param {Array} holders The `partials` placeholder indexes.
   * @params {boolean} [isCurried] Specify composing for a curried function.
   * @returns {Array} Returns the new array of composed arguments.
   */
  function composeArgs(args, partials, holders, isCurried) {
    var argsIndex = -1,
        argsLength = args.length,
        holdersLength = holders.length,
        leftIndex = -1,
        leftLength = partials.length,
        rangeLength = nativeMax(argsLength - holdersLength, 0),
        result = Array(leftLength + rangeLength),
        isUncurried = !isCurried;

    while (++leftIndex < leftLength) {
      result[leftIndex] = partials[leftIndex];
    }
    while (++argsIndex < holdersLength) {
      if (isUncurried || argsIndex < argsLength) {
        result[holders[argsIndex]] = args[argsIndex];
      }
    }
    while (rangeLength--) {
      result[leftIndex++] = args[argsIndex++];
    }
    return result;
  }

  /**
   * This function is like `composeArgs` except that the arguments composition
   * is tailored for `_.partialRight`.
   *
   * @private
   * @param {Array} args The provided arguments.
   * @param {Array} partials The arguments to append to those provided.
   * @param {Array} holders The `partials` placeholder indexes.
   * @params {boolean} [isCurried] Specify composing for a curried function.
   * @returns {Array} Returns the new array of composed arguments.
   */
  function composeArgsRight(args, partials, holders, isCurried) {
    var argsIndex = -1,
        argsLength = args.length,
        holdersIndex = -1,
        holdersLength = holders.length,
        rightIndex = -1,
        rightLength = partials.length,
        rangeLength = nativeMax(argsLength - holdersLength, 0),
        result = Array(rangeLength + rightLength),
        isUncurried = !isCurried;

    while (++argsIndex < rangeLength) {
      result[argsIndex] = args[argsIndex];
    }
    var offset = argsIndex;
    while (++rightIndex < rightLength) {
      result[offset + rightIndex] = partials[rightIndex];
    }
    while (++holdersIndex < holdersLength) {
      if (isUncurried || argsIndex < argsLength) {
        result[offset + holders[holdersIndex]] = args[argsIndex++];
      }
    }
    return result;
  }

  /**
   * Copies the values of `source` to `array`.
   *
   * @private
   * @param {Array} source The array to copy values from.
   * @param {Array} [array=[]] The array to copy values to.
   * @returns {Array} Returns `array`.
   */
  function copyArray(source, array) {
    var index = -1,
        length = source.length;

    array || (array = Array(length));
    while (++index < length) {
      array[index] = source[index];
    }
    return array;
  }

  /**
   * 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 = {});

    var index = -1,
        length = props.length;

    while (++index < length) {
      var key = props[index];

      var newValue = customizer
        ? customizer(object[key], source[key], key, object, source)
        : source[key];

      assignValue(object, key, newValue);
    }
    return object;
  }

  /**
   * 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);
  }

  /**
   * Creates a function like `_.groupBy`.
   *
   * @private
   * @param {Function} setter The function to set accumulator values.
   * @param {Function} [initializer] The accumulator object initializer.
   * @returns {Function} Returns the new aggregator function.
   */
  function createAggregator(setter, initializer) {
    return function(collection, iteratee) {
      var func = isArray(collection) ? arrayAggregator : baseAggregator,
          accumulator = initializer ? initializer() : {};

      return func(collection, setter, getIteratee(iteratee), accumulator);
    };
  }

  /**
   * 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;

      customizer = (assigner.length > 3 && typeof customizer == 'function')
        ? (length--, customizer)
        : undefined;

      if (guard && isIterateeCall(sources[0], sources[1], guard)) {
        customizer = length < 3 ? undefined : customizer;
        length = 1;
      }
      object = Object(object);
      while (++index < length) {
        var source = sources[index];
        if (source) {
          assigner(object, source, index, customizer);
        }
      }
      return object;
    });
  }

  /**
   * Creates a `baseEach` or `baseEachRight` function.
   *
   * @private
   * @param {Function} eachFunc The function to iterate over a collection.
   * @param {boolean} [fromRight] Specify iterating from right to left.
   * @returns {Function} Returns the new base function.
   */
  function createBaseEach(eachFunc, fromRight) {
    return function(collection, iteratee) {
      if (collection == null) {
        return collection;
      }
      if (!isArrayLike(collection)) {
        return eachFunc(collection, iteratee);
      }
      var length = collection.length,
          index = fromRight ? length : -1,
          iterable = Object(collection);

      while ((fromRight ? index-- : ++index < length)) {
        if (iteratee(iterable[index], index, iterable) === false) {
          break;
        }
      }
      return collection;
    };
  }

  /**
   * Creates a base function for methods like `_.forIn` and `_.forOwn`.
   *
   * @private
   * @param {boolean} [fromRight] Specify iterating from right to left.
   * @returns {Function} Returns the new base function.
   */
  function createBaseFor(fromRight) {
    return function(object, iteratee, keysFunc) {
      var index = -1,
          iterable = Object(object),
          props = keysFunc(object),
          length = props.length;

      while (length--) {
        var key = props[fromRight ? length : ++index];
        if (iteratee(iterable[key], key, iterable) === false) {
          break;
        }
      }
      return object;
    };
  }

  /**
   * Creates a function that wraps `func` to invoke it with the optional `this`
   * binding of `thisArg`.
   *
   * @private
   * @param {Function} func The function to wrap.
   * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper`
   *  for more details.
   * @param {*} [thisArg] The `this` binding of `func`.
   * @returns {Function} Returns the new wrapped function.
   */
  function createBaseWrapper(func, bitmask, thisArg) {
    var isBind = bitmask & BIND_FLAG,
        Ctor = createCtorWrapper(func);

    function wrapper() {
      var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
      return fn.apply(isBind ? thisArg : this, arguments);
    }
    return wrapper;
  }

  /**
   * Creates a function like `_.lowerFirst`.
   *
   * @private
   * @param {string} methodName The name of the `String` case method to use.
   * @returns {Function} Returns the new case function.
   */
  function createCaseFirst(methodName) {
    return function(string) {
      string = toString(string);

      var strSymbols = reHasComplexSymbol.test(string)
        ? stringToArray(string)
        : undefined;

      var chr = strSymbols
        ? strSymbols[0]
        : string.charAt(0);

      var trailing = strSymbols
        ? castSlice(strSymbols, 1).join('')
        : string.slice(1);

      return chr[methodName]() + trailing;
    };
  }

  /**
   * Creates a function like `_.camelCase`.
   *
   * @private
   * @param {Function} callback The function to combine each word.
   * @returns {Function} Returns the new compounder function.
   */
  function createCompounder(callback) {
    return function(string) {
      return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');
    };
  }

  /**
   * Creates a function that produces an instance of `Ctor` regardless of
   * whether it was invoked as part of a `new` expression or by `call` or `apply`.
   *
   * @private
   * @param {Function} Ctor The constructor to wrap.
   * @returns {Function} Returns the new wrapped function.
   */
  function createCtorWrapper(Ctor) {
    return function() {
      // Use a `switch` statement to work with class constructors. See
      // http://ecma-international.org/ecma-262/6.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist
      // for more details.
      var args = arguments;
      switch (args.length) {
        case 0: return new Ctor;
        case 1: return new Ctor(args[0]);
        case 2: return new Ctor(args[0], args[1]);
        case 3: return new Ctor(args[0], args[1], args[2]);
        case 4: return new Ctor(args[0], args[1], args[2], args[3]);
        case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);
        case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);
        case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);
      }
      var thisBinding = baseCreate(Ctor.prototype),
          result = Ctor.apply(thisBinding, args);

      // Mimic the constructor's `return` behavior.
      // See https://es5.github.io/#x13.2.2 for more details.
      return isObject(result) ? result : thisBinding;
    };
  }

  /**
   * Creates a function that wraps `func` to enable currying.
   *
   * @private
   * @param {Function} func The function to wrap.
   * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper`
   *  for more details.
   * @param {number} arity The arity of `func`.
   * @returns {Function} Returns the new wrapped function.
   */
  function createCurryWrapper(func, bitmask, arity) {
    var Ctor = createCtorWrapper(func);

    function wrapper() {
      var length = arguments.length,
          args = Array(length),
          index = length,
          placeholder = getHolder(wrapper);

      while (index--) {
        args[index] = arguments[index];
      }
      var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)
        ? []
        : replaceHolders(args, placeholder);

      length -= holders.length;
      if (length < arity) {
        return createRecurryWrapper(
          func, bitmask, createHybridWrapper, wrapper.placeholder, undefined,
          args, holders, undefined, undefined, arity - length);
      }
      var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
      return apply(fn, this, args);
    }
    return wrapper;
  }

  /**
   * Creates a `_.find` or `_.findLast` function.
   *
   * @private
   * @param {Function} findIndexFunc The function to find the collection index.
   * @returns {Function} Returns the new find function.
   */
  function createFind(findIndexFunc) {
    return function(collection, predicate, fromIndex) {
      var iterable = Object(collection);
      predicate = getIteratee(predicate, 3);
      if (!isArrayLike(collection)) {
        var props = keys(collection);
      }
      var index = findIndexFunc(props || collection, function(value, key) {
        if (props) {
          key = value;
          value = iterable[key];
        }
        return predicate(value, key, iterable);
      }, fromIndex);
      return index > -1 ? collection[props ? props[index] : index] : undefined;
    };
  }

  /**
   * Creates a `_.flow` or `_.flowRight` function.
   *
   * @private
   * @param {boolean} [fromRight] Specify iterating from right to left.
   * @returns {Function} Returns the new flow function.
   */
  function createFlow(fromRight) {
    return rest(function(funcs) {
      funcs = baseFlatten(funcs, 1);

      var length = funcs.length,
          index = length,
          prereq = LodashWrapper.prototype.thru;

      if (fromRight) {
        funcs.reverse();
      }
      while (index--) {
        var func = funcs[index];
        if (typeof func != 'function') {
          throw new TypeError(FUNC_ERROR_TEXT);
        }
        if (prereq && !wrapper && getFuncName(func) == 'wrapper') {
          var wrapper = new LodashWrapper([], true);
        }
      }
      index = wrapper ? index : length;
      while (++index < length) {
        func = funcs[index];

        var funcName = getFuncName(func),
            data = funcName == 'wrapper' ? getData(func) : undefined;

        if (data && isLaziable(data[0]) &&
              data[1] == (ARY_FLAG | CURRY_FLAG | PARTIAL_FLAG | REARG_FLAG) &&
              !data[4].length && data[9] == 1
            ) {
          wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);
        } else {
          wrapper = (func.length == 1 && isLaziable(func))
            ? wrapper[funcName]()
            : wrapper.thru(func);
        }
      }
      return function() {
        var args = arguments,
            value = args[0];

        if (wrapper && args.length == 1 &&
            isArray(value) && value.length >= LARGE_ARRAY_SIZE) {
          return wrapper.plant(value).value();
        }
        var index = 0,
            result = length ? funcs[index].apply(this, args) : value;

        while (++index < length) {
          result = funcs[index].call(this, result);
        }
        return result;
      };
    });
  }

  /**
   * Creates a function that wraps `func` to invoke it with optional `this`
   * binding of `thisArg`, partial application, and currying.
   *
   * @private
   * @param {Function|string} func The function or method name to wrap.
   * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper`
   *  for more details.
   * @param {*} [thisArg] The `this` binding of `func`.
   * @param {Array} [partials] The arguments to prepend to those provided to
   *  the new function.
   * @param {Array} [holders] The `partials` placeholder indexes.
   * @param {Array} [partialsRight] The arguments to append to those provided
   *  to the new function.
   * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.
   * @param {Array} [argPos] The argument positions of the new function.
   * @param {number} [ary] The arity cap of `func`.
   * @param {number} [arity] The arity of `func`.
   * @returns {Function} Returns the new wrapped function.
   */
  function createHybridWrapper(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {
    var isAry = bitmask & ARY_FLAG,
        isBind = bitmask & BIND_FLAG,
        isBindKey = bitmask & BIND_KEY_FLAG,
        isCurried = bitmask & (CURRY_FLAG | CURRY_RIGHT_FLAG),
        isFlip = bitmask & FLIP_FLAG,
        Ctor = isBindKey ? undefined : createCtorWrapper(func);

    function wrapper() {
      var length = arguments.length,
          args = Array(length),
          index = length;

      while (index--) {
        args[index] = arguments[index];
      }
      if (isCurried) {
        var placeholder = getHolder(wrapper),
            holdersCount = countHolders(args, placeholder);
      }
      if (partials) {
        args = composeArgs(args, partials, holders, isCurried);
      }
      if (partialsRight) {
        args = composeArgsRight(args, partialsRight, holdersRight, isCurried);
      }
      length -= holdersCount;
      if (isCurried && length < arity) {
        var newHolders = replaceHolders(args, placeholder);
        return createRecurryWrapper(
          func, bitmask, createHybridWrapper, wrapper.placeholder, thisArg,
          args, newHolders, argPos, ary, arity - length
        );
      }
      var thisBinding = isBind ? thisArg : this,
          fn = isBindKey ? thisBinding[func] : func;

      length = args.length;
      if (argPos) {
        args = reorder(args, argPos);
      } else if (isFlip && length > 1) {
        args.reverse();
      }
      if (isAry && ary < length) {
        args.length = ary;
      }
      if (this && this !== root && this instanceof wrapper) {
        fn = Ctor || createCtorWrapper(fn);
      }
      return fn.apply(thisBinding, args);
    }
    return wrapper;
  }

  /**
   * Creates a function like `_.invertBy`.
   *
   * @private
   * @param {Function} setter The function to set accumulator values.
   * @param {Function} toIteratee The function to resolve iteratees.
   * @returns {Function} Returns the new inverter function.
   */
  function createInverter(setter, toIteratee) {
    return function(object, iteratee) {
      return baseInverter(object, setter, toIteratee(iteratee), {});
    };
  }

  /**
   * Creates a function that performs a mathematical operation on two values.
   *
   * @private
   * @param {Function} operator The function to perform the operation.
   * @returns {Function} Returns the new mathematical operation function.
   */
  function createMathOperation(operator) {
    return function(value, other) {
      var result;
      if (value === undefined && other === undefined) {
        return 0;
      }
      if (value !== undefined) {
        result = value;
      }
      if (other !== undefined) {
        if (result === undefined) {
          return other;
        }
        if (typeof value == 'string' || typeof other == 'string') {
          value = baseToString(value);
          other = baseToString(other);
        } else {
          value = baseToNumber(value);
          other = baseToNumber(other);
        }
        result = operator(value, other);
      }
      return result;
    };
  }

  /**
   * Creates a function like `_.over`.
   *
   * @private
   * @param {Function} arrayFunc The function to iterate over iteratees.
   * @returns {Function} Returns the new over function.
   */
  function createOver(arrayFunc) {
    return rest(function(iteratees) {
      iteratees = (iteratees.length == 1 && isArray(iteratees[0]))
        ? arrayMap(iteratees[0], baseUnary(getIteratee()))
        : arrayMap(baseFlatten(iteratees, 1, isFlattenableIteratee), baseUnary(getIteratee()));

      return rest(function(args) {
        var thisArg = this;
        return arrayFunc(iteratees, function(iteratee) {
          return apply(iteratee, thisArg, args);
        });
      });
    });
  }

  /**
   * Creates the padding for `string` based on `length`. The `chars` string
   * is truncated if the number of characters exceeds `length`.
   *
   * @private
   * @param {number} length The padding length.
   * @param {string} [chars=' '] The string used as padding.
   * @returns {string} Returns the padding for `string`.
   */
  function createPadding(length, chars) {
    chars = chars === undefined ? ' ' : baseToString(chars);

    var charsLength = chars.length;
    if (charsLength < 2) {
      return charsLength ? baseRepeat(chars, length) : chars;
    }
    var result = baseRepeat(chars, nativeCeil(length / stringSize(chars)));
    return reHasComplexSymbol.test(chars)
      ? castSlice(stringToArray(result), 0, length).join('')
      : result.slice(0, length);
  }

  /**
   * Creates a function that wraps `func` to invoke it with the `this` binding
   * of `thisArg` and `partials` prepended to the arguments it receives.
   *
   * @private
   * @param {Function} func The function to wrap.
   * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper`
   *  for more details.
   * @param {*} thisArg The `this` binding of `func`.
   * @param {Array} partials The arguments to prepend to those provided to
   *  the new function.
   * @returns {Function} Returns the new wrapped function.
   */
  function createPartialWrapper(func, bitmask, thisArg, partials) {
    var isBind = bitmask & BIND_FLAG,
        Ctor = createCtorWrapper(func);

    function wrapper() {
      var argsIndex = -1,
          argsLength = arguments.length,
          leftIndex = -1,
          leftLength = partials.length,
          args = Array(leftLength + argsLength),
          fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;

      while (++leftIndex < leftLength) {
        args[leftIndex] = partials[leftIndex];
      }
      while (argsLength--) {
        args[leftIndex++] = arguments[++argsIndex];
      }
      return apply(fn, isBind ? thisArg : this, args);
    }
    return wrapper;
  }

  /**
   * Creates a `_.range` or `_.rangeRight` function.
   *
   * @private
   * @param {boolean} [fromRight] Specify iterating from right to left.
   * @returns {Function} Returns the new range function.
   */
  function createRange(fromRight) {
    return function(start, end, step) {
      if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {
        end = step = undefined;
      }
      // Ensure the sign of `-0` is preserved.
      start = toNumber(start);
      start = start === start ? start : 0;
      if (end === undefined) {
        end = start;
        start = 0;
      } else {
        end = toNumber(end) || 0;
      }
      step = step === undefined ? (start < end ? 1 : -1) : (toNumber(step) || 0);
      return baseRange(start, end, step, fromRight);
    };
  }

  /**
   * Creates a function that performs a relational operation on two values.
   *
   * @private
   * @param {Function} operator The function to perform the operation.
   * @returns {Function} Returns the new relational operation function.
   */
  function createRelationalOperation(operator) {
    return function(value, other) {
      if (!(typeof value == 'string' && typeof other == 'string')) {
        value = toNumber(value);
        other = toNumber(other);
      }
      return operator(value, other);
    };
  }

  /**
   * Creates a function that wraps `func` to continue currying.
   *
   * @private
   * @param {Function} func The function to wrap.
   * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper`
   *  for more details.
   * @param {Function} wrapFunc The function to create the `func` wrapper.
   * @param {*} placeholder The placeholder value.
   * @param {*} [thisArg] The `this` binding of `func`.
   * @param {Array} [partials] The arguments to prepend to those provided to
   *  the new function.
   * @param {Array} [holders] The `partials` placeholder indexes.
   * @param {Array} [argPos] The argument positions of the new function.
   * @param {number} [ary] The arity cap of `func`.
   * @param {number} [arity] The arity of `func`.
   * @returns {Function} Returns the new wrapped function.
   */
  function createRecurryWrapper(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {
    var isCurry = bitmask & CURRY_FLAG,
        newHolders = isCurry ? holders : undefined,
        newHoldersRight = isCurry ? undefined : holders,
        newPartials = isCurry ? partials : undefined,
        newPartialsRight = isCurry ? undefined : partials;

    bitmask |= (isCurry ? PARTIAL_FLAG : PARTIAL_RIGHT_FLAG);
    bitmask &= ~(isCurry ? PARTIAL_RIGHT_FLAG : PARTIAL_FLAG);

    if (!(bitmask & CURRY_BOUND_FLAG)) {
      bitmask &= ~(BIND_FLAG | BIND_KEY_FLAG);
    }
    var newData = [
      func, bitmask, thisArg, newPartials, newHolders, newPartialsRight,
      newHoldersRight, argPos, ary, arity
    ];

    var result = wrapFunc.apply(undefined, newData);
    if (isLaziable(func)) {
      setData(result, newData);
    }
    result.placeholder = placeholder;
    return result;
  }

  /**
   * Creates a function like `_.round`.
   *
   * @private
   * @param {string} methodName The name of the `Math` method to use when rounding.
   * @returns {Function} Returns the new round function.
   */
  function createRound(methodName) {
    var func = Math[methodName];
    return function(number, precision) {
      number = toNumber(number);
      precision = nativeMin(toInteger(precision), 292);
      if (precision) {
        // Shift with exponential notation to avoid floating-point issues.
        // See [MDN](https://mdn.io/round#Examples) for more details.
        var pair = (toString(number) + 'e').split('e'),
            value = func(pair[0] + 'e' + (+pair[1] + precision));

        pair = (toString(value) + 'e').split('e');
        return +(pair[0] + 'e' + (+pair[1] - precision));
      }
      return func(number);
    };
  }

  /**
   * 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);
  };

  /**
   * Creates a `_.toPairs` or `_.toPairsIn` function.
   *
   * @private
   * @param {Function} keysFunc The function to get the keys of a given object.
   * @returns {Function} Returns the new pairs function.
   */
  function createToPairs(keysFunc) {
    return function(object) {
      var tag = getTag(object);
      if (tag == mapTag) {
        return mapToArray(object);
      }
      if (tag == setTag) {
        return setToPairs(object);
      }
      return baseToPairs(object, keysFunc(object));
    };
  }

  /**
   * Creates a function that either curries or invokes `func` with optional
   * `this` binding and partially applied arguments.
   *
   * @private
   * @param {Function|string} func The function or method name to wrap.
   * @param {number} bitmask The bitmask of wrapper flags.
   *  The bitmask may be composed of the following flags:
   *     1 - `_.bind`
   *     2 - `_.bindKey`
   *     4 - `_.curry` or `_.curryRight` of a bound function
   *     8 - `_.curry`
   *    16 - `_.curryRight`
   *    32 - `_.partial`
   *    64 - `_.partialRight`
   *   128 - `_.rearg`
   *   256 - `_.ary`
   *   512 - `_.flip`
   * @param {*} [thisArg] The `this` binding of `func`.
   * @param {Array} [partials] The arguments to be partially applied.
   * @param {Array} [holders] The `partials` placeholder indexes.
   * @param {Array} [argPos] The argument positions of the new function.
   * @param {number} [ary] The arity cap of `func`.
   * @param {number} [arity] The arity of `func`.
   * @returns {Function} Returns the new wrapped function.
   */
  function createWrapper(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {
    var isBindKey = bitmask & BIND_KEY_FLAG;
    if (!isBindKey && typeof func != 'function') {
      throw new TypeError(FUNC_ERROR_TEXT);
    }
    var length = partials ? partials.length : 0;
    if (!length) {
      bitmask &= ~(PARTIAL_FLAG | PARTIAL_RIGHT_FLAG);
      partials = holders = undefined;
    }
    ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);
    arity = arity === undefined ? arity : toInteger(arity);
    length -= holders ? holders.length : 0;

    if (bitmask & PARTIAL_RIGHT_FLAG) {
      var partialsRight = partials,
          holdersRight = holders;

      partials = holders = undefined;
    }
    var data = isBindKey ? undefined : getData(func);

    var newData = [
      func, bitmask, thisArg, partials, holders, partialsRight, holdersRight,
      argPos, ary, arity
    ];

    if (data) {
      mergeData(newData, data);
    }
    func = newData[0];
    bitmask = newData[1];
    thisArg = newData[2];
    partials = newData[3];
    holders = newData[4];
    arity = newData[9] = newData[9] == null
      ? (isBindKey ? 0 : func.length)
      : nativeMax(newData[9] - length, 0);

    if (!arity && bitmask & (CURRY_FLAG | CURRY_RIGHT_FLAG)) {
      bitmask &= ~(CURRY_FLAG | CURRY_RIGHT_FLAG);
    }
    if (!bitmask || bitmask == BIND_FLAG) {
      var result = createBaseWrapper(func, bitmask, thisArg);
    } else if (bitmask == CURRY_FLAG || bitmask == CURRY_RIGHT_FLAG) {
      result = createCurryWrapper(func, bitmask, arity);
    } else if ((bitmask == PARTIAL_FLAG || bitmask == (BIND_FLAG | PARTIAL_FLAG)) && !holders.length) {
      result = createPartialWrapper(func, bitmask, thisArg, partials);
    } else {
      result = createHybridWrapper.apply(undefined, newData);
    }
    var setter = data ? baseSetData : setData;
    return setter(result, newData);
  }

  /**
   * 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;

    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;

    stack.set(array, other);

    // Ignore non-index properties.
    while (++index < arrLength) {
      var arrValue = array[index],
          othValue = other[index];

      if (customizer) {
        var compared = isPartial
          ? customizer(othValue, arrValue, index, other, array, stack)
          : customizer(arrValue, othValue, index, array, other, stack);
      }
      if (compared !== undefined) {
        if (compared) {
          continue;
        }
        result = false;
        break;
      }
      // Recursively compare arrays (susceptible to call stack limits).
      if (seen) {
        if (!arraySome(other, function(othValue, othIndex) {
              if (!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;
  }

  /**
   * A specialized version of `baseIsEqualDeep` for comparing objects of
   * the same `toStringTag`.
   *
   * **Note:** This function only supports comparing values with tags of
   * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
   *
   * @private
   * @param {Object} object The object to compare.
   * @param {Object} other The other object to compare.
   * @param {string} tag The `toStringTag` of the objects to compare.
   * @param {Function} equalFunc The function to determine equivalents of values.
   * @param {Function} customizer The function to customize comparisons.
   * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual`
   *  for more details.
   * @param {Object} stack Tracks traversed `object` and `other` objects.
   * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
   */
  function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) {
    switch (tag) {
      case dataViewTag:
        if ((object.byteLength != other.byteLength) ||
            (object.byteOffset != other.byteOffset)) {
          return false;
        }
        object = object.buffer;
        other = other.buffer;

      case arrayBufferTag:
        if ((object.byteLength != other.byteLength) ||
            !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
          return false;
        }
        return true;

      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;

      case errorTag:
        return object.name == other.name && object.message == other.message;

      case numberTag:
        // Treat `NaN` vs. `NaN` as equal.
        return (object != +object) ? other != +other : object == +other;

      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 + '');

      case mapTag:
        var convert = mapToArray;

      case setTag:
        var isPartial = bitmask & PARTIAL_COMPARE_FLAG;
        convert || (convert = setToArray);

        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);

        // Recursively compare objects (susceptible to call stack limits).
        return equalArrays(convert(object), convert(other), equalFunc, customizer, bitmask, stack);

      case symbolTag:
        if (symbolValueOf) {
          return symbolValueOf.call(object) == symbolValueOf.call(other);
        }
    }
    return false;
  }

  /**
   * 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;

    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);

    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;

      // 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;
  }

  /**
   * 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);
  }

  /**
   * Creates an array of own and inherited 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 getAllKeysIn(object) {
    return baseGetAllKeys(object, keysIn, getSymbolsIn);
  }

  /**
   * Gets metadata for `func`.
   *
   * @private
   * @param {Function} func The function to query.
   * @returns {*} Returns the metadata for `func`.
   */
  var getData = !metaMap ? noop : function(func) {
    return metaMap.get(func);
  };

  /**
   * Gets the name of `func`.
   *
   * @private
   * @param {Function} func The function to query.
   * @returns {string} Returns the function name.
   */
  function getFuncName(func) {
    var result = (func.name + ''),
        array = realNames[result],
        length = hasOwnProperty.call(realNames, result) ? array.length : 0;

    while (length--) {
      var data = array[length],
          otherFunc = data.func;
      if (otherFunc == null || otherFunc == func) {
        return data.name;
      }
    }
    return result;
  }

  /**
   * Gets the argument placeholder value for `func`.
   *
   * @private
   * @param {Function} func The function to inspect.
   * @returns {*} Returns the placeholder value.
   */
  function getHolder(func) {
    var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func;
    return object.placeholder;
  }

  /**
   * Gets the appropriate "iteratee" function. If `_.iteratee` is customized,
   * this function returns the custom method, otherwise it returns `baseIteratee`.
   * If arguments are provided, the chosen function is invoked with them and
   * its result is returned.
   *
   * @private
   * @param {*} [value] The value to convert to an iteratee.
   * @param {number} [arity] The arity of the created iteratee.
   * @returns {Function} Returns the chosen function or its result.
   */
  function getIteratee() {
    var result = lodash.iteratee || iteratee;
    result = result === iteratee ? baseIteratee : result;
    return arguments.length ? result(arguments[0], arguments[1]) : result;
  }

  /**
   * 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');

  /**
   * 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;
  }

  /**
   * 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;

    while (length--) {
      var key = result[length],
          value = object[key];

      result[length] = [key, value, isStrictComparable(value)];
    }
    return result;
  }

  /**
   * 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;
  }

  /**
   * Gets the `[[Prototype]]` of `value`.
   *
   * @private
   * @param {*} value The value to query.
   * @returns {null|Object} Returns the `[[Prototype]]`.
   */
  function getPrototype(value) {
    return nativeGetPrototype(Object(value));
  }

  /**
   * 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;
  }

  /**
   * Creates an array of the own and inherited enumerable symbol properties
   * of `object`.
   *
   * @private
   * @param {Object} object The object to query.
   * @returns {Array} Returns the array of symbols.
   */
  var getSymbolsIn = !getOwnPropertySymbols ? getSymbols : function(object) {
    var result = [];
    while (object) {
      arrayPush(result, getSymbols(object));
      object = getPrototype(object);
    }
    return result;
  };

  /**
   * 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;
        }
      }
      return result;
    };
  }

  /**
   * Gets the view, applying any `transforms` to the `start` and `end` positions.
   *
   * @private
   * @param {number} start The start of the view.
   * @param {number} end The end of the view.
   * @param {Array} transforms The transformations to apply to the view.
   * @returns {Object} Returns an object containing the `start` and `end`
   *  positions of the view.
   */
  function getView(start, end, transforms) {
    var index = -1,
        length = transforms.length;

    while (++index < length) {
      var data = transforms[index],
          size = data.size;

      switch (data.type) {
        case 'drop':      start += size; break;
        case 'dropRight': end -= size; break;
        case 'take':      end = nativeMin(end, start + size); break;
        case 'takeRight': start = nativeMax(start, end - size); break;
      }
    }
    return { 'start': start, 'end': end };
  }

  /**
   * 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);

    var result,
        index = -1,
        length = path.length;

    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));
  }

  /**
   * Initializes an array clone.
   *
   * @private
   * @param {Array} array The array to clone.
   * @returns {Array} Returns the initialized clone.
   */
  function initCloneArray(array) {
    var length = array.length,
        result = array.constructor(length);

    // Add properties assigned by `RegExp#exec`.
    if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
      result.index = array.index;
      result.input = array.input;
    }
    return result;
  }

  /**
   * 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))
      : {};
  }

  /**
   * 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);

      case boolTag:
      case dateTag:
        return new Ctor(+object);

      case dataViewTag:
        return cloneDataView(object, isDeep);

      case float32Tag: case float64Tag:
      case int8Tag: case int16Tag: case int32Tag:
      case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:
        return cloneTypedArray(object, isDeep);

      case mapTag:
        return cloneMap(object, isDeep, cloneFunc);

      case numberTag:
      case stringTag:
        return new Ctor(object);

      case regexpTag:
        return cloneRegExp(object);

      case setTag:
        return cloneSet(object, isDeep, cloneFunc);

      case symbolTag:
        return cloneSymbol(object);
    }
  }

  /**
   * 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;
  }

  /**
   * Checks if `value` is a flattenable `arguments` object or array.
   *
   * @private
   * @param {*} value The value to check.
   * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
   */
  function isFlattenable(value) {
    return isArray(value) || isArguments(value);
  }

  /**
   * Checks if `value` is a flattenable array and not a `_.matchesProperty`
   * iteratee shorthand.
   *
   * @private
   * @param {*} value The value to check.
   * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
   */
  function isFlattenableIteratee(value) {
    return isArray(value) && !(value.length == 2 && !isFunction(value[0]));
  }

  /**
   * Checks if `value` is a valid array-like index.
   *
   * @private
   * @param {*} value The value to check.
   * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
   * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
   */
  function isIndex(value, length) {
    length = length == null ? MAX_SAFE_INTEGER : length;
    return !!length &&
      (typeof value == 'number' || reIsUint.test(value)) &&
      (value > -1 && value % 1 == 0 && value < length);
  }

  /**
   * Checks if the given arguments are from an iteratee call.
   *
   * @private
   * @param {*} value The potential iteratee value argument.
   * @param {*} index The potential iteratee index or key argument.
   * @param {*} object The potential iteratee object argument.
   * @returns {boolean} Returns `true` if the arguments are from an iteratee call,
   *  else `false`.
   */
  function isIterateeCall(value, index, object) {
    if (!isObject(object)) {
      return false;
    }
    var type = typeof index;
    if (type == 'number'
          ? (isArrayLike(object) && isIndex(index, object.length))
          : (type == 'string' && index in object)
        ) {
      return eq(object[index], value);
    }
    return false;
  }

  /**
   * Checks if `value` is a property name and not a property path.
   *
   * @private
   * @param {*} value The value to check.
   * @param {Object} [object] The object to query keys on.
   * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
   */
  function isKey(value, object) {
    if (isArray(value)) {
      return false;
    }
    var type = typeof value;
    if (type == 'number' || type == 'symbol' || type == 'boolean' ||
        value == null || isSymbol(value)) {
      return true;
    }
    return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
      (object != null && value in Object(object));
  }

  /**
   * Checks if `value` is suitable for use as unique object key.
   *
   * @private
   * @param {*} value The value to check.
   * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
   */
  function isKeyable(value) {
    var type = typeof value;
    return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
      ? (value !== '__proto__')
      : (value === null);
  }

  /**
   * Checks if `func` has a lazy counterpart.
   *
   * @private
   * @param {Function} func The function to check.
   * @returns {boolean} Returns `true` if `func` has a lazy counterpart,
   *  else `false`.
   */
  function isLaziable(func) {
    var funcName = getFuncName(func),
        other = lodash[funcName];

    if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {
      return false;
    }
    if (func === other) {
      return true;
    }
    var data = getData(other);
    return !!data && func === data[0];
  }

  /**
   * Checks if `func` has its source masked.
   *
   * @private
   * @param {Function} func The function to check.
   * @returns {boolean} Returns `true` if `func` is masked, else `false`.
   */
  function isMasked(func) {
    return !!maskSrcKey && (maskSrcKey in func);
  }

  /**
   * Checks if `func` is capable of being masked.
   *
   * @private
   * @param {*} value The value to check.
   * @returns {boolean} Returns `true` if `func` is maskable, else `false`.
   */
  var isMaskable = coreJsData ? isFunction : stubFalse;

  /**
   * Checks if `value` is likely a prototype object.
   *
   * @private
   * @param {*} value The value to check.
   * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
   */
  function isPrototype(value) {
    var Ctor = value && value.constructor,
        proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;

    return value === proto;
  }

  /**
   * 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);
  }

  /**
   * A specialized version of `matchesProperty` for source values suitable
   * for strict equality comparisons, i.e. `===`.
   *
   * @private
   * @param {string} key The key of the property to get.
   * @param {*} srcValue The value to match.
   * @returns {Function} Returns the new spec function.
   */
  function matchesStrictComparable(key, srcValue) {
    return function(object) {
      if (object == null) {
        return false;
      }
      return object[key] === srcValue &&
        (srcValue !== undefined || (key in Object(object)));
    };
  }

  /**
   * Merges the function metadata of `source` into `data`.
   *
   * Merging metadata reduces the number of wrappers used to invoke a function.
   * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`
   * may be applied regardless of execution order. Methods like `_.ary` and
   * `_.rearg` modify function arguments, making the order in which they are
   * executed important, preventing the merging of metadata. However, we make
   * an exception for a safe combined case where curried functions have `_.ary`
   * and or `_.rearg` applied.
   *
   * @private
   * @param {Array} data The destination metadata.
   * @param {Array} source The source metadata.
   * @returns {Array} Returns `data`.
   */
  function mergeData(data, source) {
    var bitmask = data[1],
        srcBitmask = source[1],
        newBitmask = bitmask | srcBitmask,
        isCommon = newBitmask < (BIND_FLAG | BIND_KEY_FLAG | ARY_FLAG);

    var isCombo =
      ((srcBitmask == ARY_FLAG) && (bitmask == CURRY_FLAG)) ||
      ((srcBitmask == ARY_FLAG) && (bitmask == REARG_FLAG) && (data[7].length <= source[8])) ||
      ((srcBitmask == (ARY_FLAG | REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == CURRY_FLAG));

    // Exit early if metadata can't be merged.
    if (!(isCommon || isCombo)) {
      return data;
    }
    // Use source `thisArg` if available.
    if (srcBitmask & BIND_FLAG) {
      data[2] = source[2];
      // Set when currying a bound function.
      newBitmask |= bitmask & BIND_FLAG ? 0 : CURRY_BOUND_FLAG;
    }
    // Compose partial arguments.
    var value = source[3];
    if (value) {
      var partials = data[3];
      data[3] = partials ? composeArgs(partials, value, source[4]) : value;
      data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];
    }
    // Compose partial right arguments.
    value = source[5];
    if (value) {
      partials = data[5];
      data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;
      data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];
    }
    // Use source `argPos` if available.
    value = source[7];
    if (value) {
      data[7] = value;
    }
    // Use source `ary` if it's smaller.
    if (srcBitmask & ARY_FLAG) {
      data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);
    }
    // Use source `arity` if one is not provided.
    if (data[9] == null) {
      data[9] = source[9];
    }
    // Use source `func` and merge bitmasks.
    data[0] = source[0];
    data[1] = newBitmask;

    return data;
  }

  /**
   * Used by `_.defaultsDeep` to customize its `_.merge` use.
   *
   * @private
   * @param {*} objValue The destination value.
   * @param {*} srcValue The source value.
   * @param {string} key The key of the property to merge.
   * @param {Object} object The parent object of `objValue`.
   * @param {Object} source The parent object of `srcValue`.
   * @param {Object} [stack] Tracks traversed source values and their merged
   *  counterparts.
   * @returns {*} Returns the value to assign.
   */
  function mergeDefaults(objValue, srcValue, key, object, source, stack) {
    if (isObject(objValue) && isObject(srcValue)) {
      baseMerge(objValue, srcValue, undefined, mergeDefaults, stack.set(srcValue, objValue));
    }
    return objValue;
  }

  /**
   * Gets the parent value at `path` of `object`.
   *
   * @private
   * @param {Object} object The object to query.
   * @param {Array} path The path to get the parent value of.
   * @returns {*} Returns the parent value.
   */
  function parent(object, path) {
    return path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1));
  }

  /**
   * Reorder `array` according to the specified indexes where the element at
   * the first index is assigned as the first element, the element at
   * the second index is assigned as the second element, and so on.
   *
   * @private
   * @param {Array} array The array to reorder.
   * @param {Array} indexes The arranged array indexes.
   * @returns {Array} Returns `array`.
   */
  function reorder(array, indexes) {
    var arrLength = array.length,
        length = nativeMin(indexes.length, arrLength),
        oldArray = copyArray(array);

    while (length--) {
      var index = indexes[length];
      array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;
    }
    return array;
  }

  /**
   * Sets metadata for `func`.
   *
   * **Note:** If this function becomes hot, i.e. is invoked a lot in a short
   * period of time, it will trip its breaker and transition to an identity
   * function to avoid garbage collection pauses in V8. See
   * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070)
   * for more details.
   *
   * @private
   * @param {Function} func The function to associate metadata with.
   * @param {*} data The metadata.
   * @returns {Function} Returns `func`.
   */
  var setData = (function() {
    var count = 0,
        lastCalled = 0;

    return function(key, value) {
      var stamp = now(),
          remaining = HOT_SPAN - (stamp - lastCalled);

      lastCalled = stamp;
      if (remaining > 0) {
        if (++count >= HOT_COUNT) {
          return key;
        }
      } else {
        count = 0;
      }
      return baseSetData(key, value);
    };
  }());

  /**
   * 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;
  });

  /**
   * 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;
  }

  /**
   * Converts `func` to its source code.
   *
   * @private
   * @param {Function} func The function to process.
   * @returns {string} Returns the source code.
   */
  function toSource(func) {
    if (func != null) {
      try {
        return funcToString.call(func);
      } catch (e) {}
      try {
        return (func + '');
      } catch (e) {}
    }
    return '';
  }

  /**
   * Creates a clone of `wrapper`.
   *
   * @private
   * @param {Object} wrapper The wrapper to clone.
   * @returns {Object} Returns the cloned wrapper.
   */
  function wrapperClone(wrapper) {
    if (wrapper instanceof LazyWrapper) {
      return wrapper.clone();
    }
    var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);
    result.__actions__ = copyArray(wrapper.__actions__);
    result.__index__  = wrapper.__index__;
    result.__values__ = wrapper.__values__;
    return result;
  }

  /*------------------------------------------------------------------------*/

  /**
   * Creates an array of elements split into groups the length of `size`.
   * If `array` can't be split evenly, the final chunk will be the remaining
   * elements.
   *
   * @static
   * @memberOf _
   * @since 3.0.0
   * @category Array
   * @param {Array} array The array to process.
   * @param {number} [size=1] The length of each chunk
   * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
   * @returns {Array} Returns the new array of chunks.
   * @example
   *
   * _.chunk(['a', 'b', 'c', 'd'], 2);
   * // => [['a', 'b'], ['c', 'd']]
   *
   * _.chunk(['a', 'b', 'c', 'd'], 3);
   * // => [['a', 'b', 'c'], ['d']]
   */
  function chunk(array, size, guard) {
    if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) {
      size = 1;
    } else {
      size = nativeMax(toInteger(size), 0);
    }
    var length = array ? array.length : 0;
    if (!length || size < 1) {
      return [];
    }
    var index = 0,
        resIndex = 0,
        result = Array(nativeCeil(length / size));

    while (index < length) {
      result[resIndex++] = baseSlice(array, index, (index += size));
    }
    return result;
  }

  /**
   * Creates an array with all falsey values removed. The values `false`, `null`,
   * `0`, `""`, `undefined`, and `NaN` are falsey.
   *
   * @static
   * @memberOf _
   * @since 0.1.0
   * @category Array
   * @param {Array} array The array to compact.
   * @returns {Array} Returns the new array of filtered values.
   * @example
   *
   * _.compact([0, 1, false, 2, '', 3]);
   * // => [1, 2, 3]
   */
  function compact(array) {
    var index = -1,
        length = array ? array.length : 0,
        resIndex = 0,
        result = [];

    while (++index < length) {
      var value = array[index];
      if (value) {
        result[resIndex++] = value;
      }
    }
    return result;
  }

  /**
   * Creates a new array concatenating `array` with any additional arrays
   * and/or values.
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category Array
   * @param {Array} array The array to concatenate.
   * @param {...*} [values] The values to concatenate.
   * @returns {Array} Returns the new concatenated array.
   * @example
   *
   * var array = [1];
   * var other = _.concat(array, 2, [3], [[4]]);
   *
   * console.log(other);
   * // => [1, 2, 3, [4]]
   *
   * console.log(array);
   * // => [1]
   */
  function concat() {
    var length = arguments.length,
        args = Array(length ? length - 1 : 0),
        array = arguments[0],
        index = length;

    while (index--) {
      args[index - 1] = arguments[index];
    }
    return length
      ? arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1))
      : [];
  }

  /**
   * Creates an array of unique `array` values not included in the other given
   * arrays using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
   * for equality comparisons. The order of result values is determined by the
   * order they occur in the first array.
   *
   * @static
   * @memberOf _
   * @since 0.1.0
   * @category Array
   * @param {Array} array The array to inspect.
   * @param {...Array} [values] The values to exclude.
   * @returns {Array} Returns the new array of filtered values.
   * @see _.without, _.xor
   * @example
   *
   * _.difference([2, 1], [2, 3]);
   * // => [1]
   */
  var difference = rest(function(array, values) {
    return isArrayLikeObject(array)
      ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))
      : [];
  });

  /**
   * This method is like `_.difference` except that it accepts `iteratee` which
   * is invoked for each element of `array` and `values` to generate the criterion
   * by which they're compared. Result values are chosen from the first array.
   * The iteratee is invoked with one argument: (value).
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category Array
   * @param {Array} array The array to inspect.
   * @param {...Array} [values] The values to exclude.
   * @param {Array|Function|Object|string} [iteratee=_.identity]
   *  The iteratee invoked per element.
   * @returns {Array} Returns the new array of filtered values.
   * @example
   *
   * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor);
   * // => [1.2]
   *
   * // The `_.property` iteratee shorthand.
   * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x');
   * // => [{ 'x': 2 }]
   */
  var differenceBy = rest(function(array, values) {
    var iteratee = last(values);
    if (isArrayLikeObject(iteratee)) {
      iteratee = undefined;
    }
    return isArrayLikeObject(array)
      ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee))
      : [];
  });

  /**
   * This method is like `_.difference` except that it accepts `comparator`
   * which is invoked to compare elements of `array` to `values`. Result values
   * are chosen from the first array. The comparator is invoked with two arguments:
   * (arrVal, othVal).
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category Array
   * @param {Array} array The array to inspect.
   * @param {...Array} [values] The values to exclude.
   * @param {Function} [comparator] The comparator invoked per element.
   * @returns {Array} Returns the new array of filtered values.
   * @example
   *
   * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
   *
   * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);
   * // => [{ 'x': 2, 'y': 1 }]
   */
  var differenceWith = rest(function(array, values) {
    var comparator = last(values);
    if (isArrayLikeObject(comparator)) {
      comparator = undefined;
    }
    return isArrayLikeObject(array)
      ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator)
      : [];
  });

  /**
   * Creates a slice of `array` with `n` elements dropped from the beginning.
   *
   * @static
   * @memberOf _
   * @since 0.5.0
   * @category Array
   * @param {Array} array The array to query.
   * @param {number} [n=1] The number of elements to drop.
   * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
   * @returns {Array} Returns the slice of `array`.
   * @example
   *
   * _.drop([1, 2, 3]);
   * // => [2, 3]
   *
   * _.drop([1, 2, 3], 2);
   * // => [3]
   *
   * _.drop([1, 2, 3], 5);
   * // => []
   *
   * _.drop([1, 2, 3], 0);
   * // => [1, 2, 3]
   */
  function drop(array, n, guard) {
    var length = array ? array.length : 0;
    if (!length) {
      return [];
    }
    n = (guard || n === undefined) ? 1 : toInteger(n);
    return baseSlice(array, n < 0 ? 0 : n, length);
  }

  /**
   * Creates a slice of `array` with `n` elements dropped from the end.
   *
   * @static
   * @memberOf _
   * @since 3.0.0
   * @category Array
   * @param {Array} array The array to query.
   * @param {number} [n=1] The number of elements to drop.
   * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
   * @returns {Array} Returns the slice of `array`.
   * @example
   *
   * _.dropRight([1, 2, 3]);
   * // => [1, 2]
   *
   * _.dropRight([1, 2, 3], 2);
   * // => [1]
   *
   * _.dropRight([1, 2, 3], 5);
   * // => []
   *
   * _.dropRight([1, 2, 3], 0);
   * // => [1, 2, 3]
   */
  function dropRight(array, n, guard) {
    var length = array ? array.length : 0;
    if (!length) {
      return [];
    }
    n = (guard || n === undefined) ? 1 : toInteger(n);
    n = length - n;
    return baseSlice(array, 0, n < 0 ? 0 : n);
  }

  /**
   * Creates a slice of `array` excluding elements dropped from the end.
   * Elements are dropped until `predicate` returns falsey. The predicate is
   * invoked with three arguments: (value, index, array).
   *
   * @static
   * @memberOf _
   * @since 3.0.0
   * @category Array
   * @param {Array} array The array to query.
   * @param {Array|Function|Object|string} [predicate=_.identity]
   *  The function invoked per iteration.
   * @returns {Array} Returns the slice of `array`.
   * @example
   *
   * var users = [
   *   { 'user': 'barney',  'active': true },
   *   { 'user': 'fred',    'active': false },
   *   { 'user': 'pebbles', 'active': false }
   * ];
   *
   * _.dropRightWhile(users, function(o) { return !o.active; });
   * // => objects for ['barney']
   *
   * // The `_.matches` iteratee shorthand.
   * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false });
   * // => objects for ['barney', 'fred']
   *
   * // The `_.matchesProperty` iteratee shorthand.
   * _.dropRightWhile(users, ['active', false]);
   * // => objects for ['barney']
   *
   * // The `_.property` iteratee shorthand.
   * _.dropRightWhile(users, 'active');
   * // => objects for ['barney', 'fred', 'pebbles']
   */
  function dropRightWhile(array, predicate) {
    return (array && array.length)
      ? baseWhile(array, getIteratee(predicate, 3), true, true)
      : [];
  }

  /**
   * Creates a slice of `array` excluding elements dropped from the beginning.
   * Elements are dropped until `predicate` returns falsey. The predicate is
   * invoked with three arguments: (value, index, array).
   *
   * @static
   * @memberOf _
   * @since 3.0.0
   * @category Array
   * @param {Array} array The array to query.
   * @param {Array|Function|Object|string} [predicate=_.identity]
   *  The function invoked per iteration.
   * @returns {Array} Returns the slice of `array`.
   * @example
   *
   * var users = [
   *   { 'user': 'barney',  'active': false },
   *   { 'user': 'fred',    'active': false },
   *   { 'user': 'pebbles', 'active': true }
   * ];
   *
   * _.dropWhile(users, function(o) { return !o.active; });
   * // => objects for ['pebbles']
   *
   * // The `_.matches` iteratee shorthand.
   * _.dropWhile(users, { 'user': 'barney', 'active': false });
   * // => objects for ['fred', 'pebbles']
   *
   * // The `_.matchesProperty` iteratee shorthand.
   * _.dropWhile(users, ['active', false]);
   * // => objects for ['pebbles']
   *
   * // The `_.property` iteratee shorthand.
   * _.dropWhile(users, 'active');
   * // => objects for ['barney', 'fred', 'pebbles']
   */
  function dropWhile(array, predicate) {
    return (array && array.length)
      ? baseWhile(array, getIteratee(predicate, 3), true)
      : [];
  }

  /**
   * Fills elements of `array` with `value` from `start` up to, but not
   * including, `end`.
   *
   * **Note:** This method mutates `array`.
   *
   * @static
   * @memberOf _
   * @since 3.2.0
   * @category Array
   * @param {Array} array The array to fill.
   * @param {*} value The value to fill `array` with.
   * @param {number} [start=0] The start position.
   * @param {number} [end=array.length] The end position.
   * @returns {Array} Returns `array`.
   * @example
   *
   * var array = [1, 2, 3];
   *
   * _.fill(array, 'a');
   * console.log(array);
   * // => ['a', 'a', 'a']
   *
   * _.fill(Array(3), 2);
   * // => [2, 2, 2]
   *
   * _.fill([4, 6, 8, 10], '*', 1, 3);
   * // => [4, '*', '*', 10]
   */
  function fill(array, value, start, end) {
    var length = array ? array.length : 0;
    if (!length) {
      return [];
    }
    if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {
      start = 0;
      end = length;
    }
    return baseFill(array, value, start, end);
  }

  /**
   * This method is like `_.find` except that it returns the index of the first
   * element `predicate` returns truthy for instead of the element itself.
   *
   * @static
   * @memberOf _
   * @since 1.1.0
   * @category Array
   * @param {Array} array The array to search.
   * @param {Array|Function|Object|string} [predicate=_.identity]
   *  The function invoked per iteration.
   * @param {number} [fromIndex=0] The index to search from.
   * @returns {number} Returns the index of the found element, else `-1`.
   * @example
   *
   * var users = [
   *   { 'user': 'barney',  'active': false },
   *   { 'user': 'fred',    'active': false },
   *   { 'user': 'pebbles', 'active': true }
   * ];
   *
   * _.findIndex(users, function(o) { return o.user == 'barney'; });
   * // => 0
   *
   * // The `_.matches` iteratee shorthand.
   * _.findIndex(users, { 'user': 'fred', 'active': false });
   * // => 1
   *
   * // The `_.matchesProperty` iteratee shorthand.
   * _.findIndex(users, ['active', false]);
   * // => 0
   *
   * // The `_.property` iteratee shorthand.
   * _.findIndex(users, 'active');
   * // => 2
   */
  function findIndex(array, predicate, fromIndex) {
    var length = array ? array.length : 0;
    if (!length) {
      return -1;
    }
    var index = fromIndex == null ? 0 : toInteger(fromIndex);
    if (index < 0) {
      index = nativeMax(length + index, 0);
    }
    return baseFindIndex(array, getIteratee(predicate, 3), index);
  }

  /**
   * This method is like `_.findIndex` except that it iterates over elements
   * of `collection` from right to left.
   *
   * @static
   * @memberOf _
   * @since 2.0.0
   * @category Array
   * @param {Array} array The array to search.
   * @param {Array|Function|Object|string} [predicate=_.identity]
   *  The function invoked per iteration.
   * @param {number} [fromIndex=array.length-1] The index to search from.
   * @returns {number} Returns the index of the found element, else `-1`.
   * @example
   *
   * var users = [
   *   { 'user': 'barney',  'active': true },
   *   { 'user': 'fred',    'active': false },
   *   { 'user': 'pebbles', 'active': false }
   * ];
   *
   * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });
   * // => 2
   *
   * // The `_.matches` iteratee shorthand.
   * _.findLastIndex(users, { 'user': 'barney', 'active': true });
   * // => 0
   *
   * // The `_.matchesProperty` iteratee shorthand.
   * _.findLastIndex(users, ['active', false]);
   * // => 2
   *
   * // The `_.property` iteratee shorthand.
   * _.findLastIndex(users, 'active');
   * // => 0
   */
  function findLastIndex(array, predicate, fromIndex) {
    var length = array ? array.length : 0;
    if (!length) {
      return -1;
    }
    var index = length - 1;
    if (fromIndex !== undefined) {
      index = toInteger(fromIndex);
      index = fromIndex < 0
        ? nativeMax(length + index, 0)
        : nativeMin(index, length - 1);
    }
    return baseFindIndex(array, getIteratee(predicate, 3), index, true);
  }

  /**
   * Flattens `array` a single level deep.
   *
   * @static
   * @memberOf _
   * @since 0.1.0
   * @category Array
   * @param {Array} array The array to flatten.
   * @returns {Array} Returns the new flattened array.
   * @example
   *
   * _.flatten([1, [2, [3, [4]], 5]]);
   * // => [1, 2, [3, [4]], 5]
   */
  function flatten(array) {
    var length = array ? array.length : 0;
    return length ? baseFlatten(array, 1) : [];
  }

  /**
   * Recursively flattens `array`.
   *
   * @static
   * @memberOf _
   * @since 3.0.0
   * @category Array
   * @param {Array} array The array to flatten.
   * @returns {Array} Returns the new flattened array.
   * @example
   *
   * _.flattenDeep([1, [2, [3, [4]], 5]]);
   * // => [1, 2, 3, 4, 5]
   */
  function flattenDeep(array) {
    var length = array ? array.length : 0;
    return length ? baseFlatten(array, INFINITY) : [];
  }

  /**
   * Recursively flatten `array` up to `depth` times.
   *
   * @static
   * @memberOf _
   * @since 4.4.0
   * @category Array
   * @param {Array} array The array to flatten.
   * @param {number} [depth=1] The maximum recursion depth.
   * @returns {Array} Returns the new flattened array.
   * @example
   *
   * var array = [1, [2, [3, [4]], 5]];
   *
   * _.flattenDepth(array, 1);
   * // => [1, 2, [3, [4]], 5]
   *
   * _.flattenDepth(array, 2);
   * // => [1, 2, 3, [4], 5]
   */
  function flattenDepth(array, depth) {
    var length = array ? array.length : 0;
    if (!length) {
      return [];
    }
    depth = depth === undefined ? 1 : toInteger(depth);
    return baseFlatten(array, depth);
  }

  /**
   * The inverse of `_.toPairs`; this method returns an object composed
   * from key-value `pairs`.
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category Array
   * @param {Array} pairs The key-value pairs.
   * @returns {Object} Returns the new object.
   * @example
   *
   * _.fromPairs([['fred', 30], ['barney', 40]]);
   * // => { 'fred': 30, 'barney': 40 }
   */
  function fromPairs(pairs) {
    var index = -1,
        length = pairs ? pairs.length : 0,
        result = {};

    while (++index < length) {
      var pair = pairs[index];
      result[pair[0]] = pair[1];
    }
    return result;
  }

  /**
   * Gets the first element of `array`.
   *
   * @static
   * @memberOf _
   * @since 0.1.0
   * @alias first
   * @category Array
   * @param {Array} array The array to query.
   * @returns {*} Returns the first element of `array`.
   * @example
   *
   * _.head([1, 2, 3]);
   * // => 1
   *
   * _.head([]);
   * // => undefined
   */
  function head(array) {
    return (array && array.length) ? array[0] : undefined;
  }

  /**
   * Gets the index at which the first occurrence of `value` is found in `array`
   * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
   * for equality comparisons. If `fromIndex` is negative, it's used as the
   * offset from the end of `array`.
   *
   * @static
   * @memberOf _
   * @since 0.1.0
   * @category Array
   * @param {Array} array The array to search.
   * @param {*} value The value to search for.
   * @param {number} [fromIndex=0] The index to search from.
   * @returns {number} Returns the index of the matched value, else `-1`.
   * @example
   *
   * _.indexOf([1, 2, 1, 2], 2);
   * // => 1
   *
   * // Search from the `fromIndex`.
   * _.indexOf([1, 2, 1, 2], 2, 2);
   * // => 3
   */
  function indexOf(array, value, fromIndex) {
    var length = array ? array.length : 0;
    if (!length) {
      return -1;
    }
    var index = fromIndex == null ? 0 : toInteger(fromIndex);
    if (index < 0) {
      index = nativeMax(length + index, 0);
    }
    return baseIndexOf(array, value, index);
  }

  /**
   * Gets all but the last element of `array`.
   *
   * @static
   * @memberOf _
   * @since 0.1.0
   * @category Array
   * @param {Array} array The array to query.
   * @returns {Array} Returns the slice of `array`.
   * @example
   *
   * _.initial([1, 2, 3]);
   * // => [1, 2]
   */
  function initial(array) {
    return dropRight(array, 1);
  }

  /**
   * Creates an array of unique values that are included in all given arrays
   * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
   * for equality comparisons. The order of result values is determined by the
   * order they occur in the first array.
   *
   * @static
   * @memberOf _
   * @since 0.1.0
   * @category Array
   * @param {...Array} [arrays] The arrays to inspect.
   * @returns {Array} Returns the new array of intersecting values.
   * @example
   *
   * _.intersection([2, 1], [2, 3]);
   * // => [2]
   */
  var intersection = rest(function(arrays) {
    var mapped = arrayMap(arrays, castArrayLikeObject);
    return (mapped.length && mapped[0] === arrays[0])
      ? baseIntersection(mapped)
      : [];
  });

  /**
   * This method is like `_.intersection` except that it accepts `iteratee`
   * which is invoked for each element of each `arrays` to generate the criterion
   * by which they're compared. Result values are chosen from the first array.
   * The iteratee is invoked with one argument: (value).
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category Array
   * @param {...Array} [arrays] The arrays to inspect.
   * @param {Array|Function|Object|string} [iteratee=_.identity]
   *  The iteratee invoked per element.
   * @returns {Array} Returns the new array of intersecting values.
   * @example
   *
   * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor);
   * // => [2.1]
   *
   * // The `_.property` iteratee shorthand.
   * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
   * // => [{ 'x': 1 }]
   */
  var intersectionBy = rest(function(arrays) {
    var iteratee = last(arrays),
        mapped = arrayMap(arrays, castArrayLikeObject);

    if (iteratee === last(mapped)) {
      iteratee = undefined;
    } else {
      mapped.pop();
    }
    return (mapped.length && mapped[0] === arrays[0])
      ? baseIntersection(mapped, getIteratee(iteratee))
      : [];
  });

  /**
   * This method is like `_.intersection` except that it accepts `comparator`
   * which is invoked to compare elements of `arrays`. Result values are chosen
   * from the first array. The comparator is invoked with two arguments:
   * (arrVal, othVal).
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category Array
   * @param {...Array} [arrays] The arrays to inspect.
   * @param {Function} [comparator] The comparator invoked per element.
   * @returns {Array} Returns the new array of intersecting values.
   * @example
   *
   * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
   * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
   *
   * _.intersectionWith(objects, others, _.isEqual);
   * // => [{ 'x': 1, 'y': 2 }]
   */
  var intersectionWith = rest(function(arrays) {
    var comparator = last(arrays),
        mapped = arrayMap(arrays, castArrayLikeObject);

    if (comparator === last(mapped)) {
      comparator = undefined;
    } else {
      mapped.pop();
    }
    return (mapped.length && mapped[0] === arrays[0])
      ? baseIntersection(mapped, undefined, comparator)
      : [];
  });

  /**
   * Converts all elements in `array` into a string separated by `separator`.
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category Array
   * @param {Array} array The array to convert.
   * @param {string} [separator=','] The element separator.
   * @returns {string} Returns the joined string.
   * @example
   *
   * _.join(['a', 'b', 'c'], '~');
   * // => 'a~b~c'
   */
  function join(array, separator) {
    return array ? nativeJoin.call(array, separator) : '';
  }

  /**
   * Gets the last element of `array`.
   *
   * @static
   * @memberOf _
   * @since 0.1.0
   * @category Array
   * @param {Array} array The array to query.
   * @returns {*} Returns the last element of `array`.
   * @example
   *
   * _.last([1, 2, 3]);
   * // => 3
   */
  function last(array) {
    var length = array ? array.length : 0;
    return length ? array[length - 1] : undefined;
  }

  /**
   * This method is like `_.indexOf` except that it iterates over elements of
   * `array` from right to left.
   *
   * @static
   * @memberOf _
   * @since 0.1.0
   * @category Array
   * @param {Array} array The array to search.
   * @param {*} value The value to search for.
   * @param {number} [fromIndex=array.length-1] The index to search from.
   * @returns {number} Returns the index of the matched value, else `-1`.
   * @example
   *
   * _.lastIndexOf([1, 2, 1, 2], 2);
   * // => 3
   *
   * // Search from the `fromIndex`.
   * _.lastIndexOf([1, 2, 1, 2], 2, 2);
   * // => 1
   */
  function lastIndexOf(array, value, fromIndex) {
    var length = array ? array.length : 0;
    if (!length) {
      return -1;
    }
    var index = length;
    if (fromIndex !== undefined) {
      index = toInteger(fromIndex);
      index = (
        index < 0
          ? nativeMax(length + index, 0)
          : nativeMin(index, length - 1)
      ) + 1;
    }
    if (value !== value) {
      return indexOfNaN(array, index - 1, true);
    }
    while (index--) {
      if (array[index] === value) {
        return index;
      }
    }
    return -1;
  }

  /**
   * Gets the element at index `n` of `array`. If `n` is negative, the nth
   * element from the end is returned.
   *
   * @static
   * @memberOf _
   * @since 4.11.0
   * @category Array
   * @param {Array} array The array to query.
   * @param {number} [n=0] The index of the element to return.
   * @returns {*} Returns the nth element of `array`.
   * @example
   *
   * var array = ['a', 'b', 'c', 'd'];
   *
   * _.nth(array, 1);
   * // => 'b'
   *
   * _.nth(array, -2);
   * // => 'c';
   */
  function nth(array, n) {
    return (array && array.length) ? baseNth(array, toInteger(n)) : undefined;
  }

  /**
   * Removes all given values from `array` using
   * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
   * for equality comparisons.
   *
   * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove`
   * to remove elements from an array by predicate.
   *
   * @static
   * @memberOf _
   * @since 2.0.0
   * @category Array
   * @param {Array} array The array to modify.
   * @param {...*} [values] The values to remove.
   * @returns {Array} Returns `array`.
   * @example
   *
   * var array = ['a', 'b', 'c', 'a', 'b', 'c'];
   *
   * _.pull(array, 'a', 'c');
   * console.log(array);
   * // => ['b', 'b']
   */
  var pull = rest(pullAll);

  /**
   * This method is like `_.pull` except that it accepts an array of values to remove.
   *
   * **Note:** Unlike `_.difference`, this method mutates `array`.
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category Array
   * @param {Array} array The array to modify.
   * @param {Array} values The values to remove.
   * @returns {Array} Returns `array`.
   * @example
   *
   * var array = ['a', 'b', 'c', 'a', 'b', 'c'];
   *
   * _.pullAll(array, ['a', 'c']);
   * console.log(array);
   * // => ['b', 'b']
   */
  function pullAll(array, values) {
    return (array && array.length && values && values.length)
      ? basePullAll(array, values)
      : array;
  }

  /**
   * This method is like `_.pullAll` except that it accepts `iteratee` which is
   * invoked for each element of `array` and `values` to generate the criterion
   * by which they're compared. The iteratee is invoked with one argument: (value).
   *
   * **Note:** Unlike `_.differenceBy`, this method mutates `array`.
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category Array
   * @param {Array} array The array to modify.
   * @param {Array} values The values to remove.
   * @param {Array|Function|Object|string} [iteratee=_.identity]
   *  The iteratee invoked per element.
   * @returns {Array} Returns `array`.
   * @example
   *
   * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];
   *
   * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');
   * console.log(array);
   * // => [{ 'x': 2 }]
   */
  function pullAllBy(array, values, iteratee) {
    return (array && array.length && values && values.length)
      ? basePullAll(array, values, getIteratee(iteratee))
      : array;
  }

  /**
   * This method is like `_.pullAll` except that it accepts `comparator` which
   * is invoked to compare elements of `array` to `values`. The comparator is
   * invoked with two arguments: (arrVal, othVal).
   *
   * **Note:** Unlike `_.differenceWith`, this method mutates `array`.
   *
   * @static
   * @memberOf _
   * @since 4.6.0
   * @category Array
   * @param {Array} array The array to modify.
   * @param {Array} values The values to remove.
   * @param {Function} [comparator] The comparator invoked per element.
   * @returns {Array} Returns `array`.
   * @example
   *
   * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];
   *
   * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual);
   * console.log(array);
   * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]
   */
  function pullAllWith(array, values, comparator) {
    return (array && array.length && values && values.length)
      ? basePullAll(array, values, undefined, comparator)
      : array;
  }

  /**
   * Removes elements from `array` corresponding to `indexes` and returns an
   * array of removed elements.
   *
   * **Note:** Unlike `_.at`, this method mutates `array`.
   *
   * @static
   * @memberOf _
   * @since 3.0.0
   * @category Array
   * @param {Array} array The array to modify.
   * @param {...(number|number[])} [indexes] The indexes of elements to remove.
   * @returns {Array} Returns the new array of removed elements.
   * @example
   *
   * var array = ['a', 'b', 'c', 'd'];
   * var pulled = _.pullAt(array, [1, 3]);
   *
   * console.log(array);
   * // => ['a', 'c']
   *
   * console.log(pulled);
   * // => ['b', 'd']
   */
  var pullAt = rest(function(array, indexes) {
    indexes = baseFlatten(indexes, 1);

    var length = array ? array.length : 0,
        result = baseAt(array, indexes);

    basePullAt(array, arrayMap(indexes, function(index) {
      return isIndex(index, length) ? +index : index;
    }).sort(compareAscending));

    return result;
  });

  /**
   * Removes all elements from `array` that `predicate` returns truthy for
   * and returns an array of the removed elements. The predicate is invoked
   * with three arguments: (value, index, array).
   *
   * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull`
   * to pull elements from an array by value.
   *
   * @static
   * @memberOf _
   * @since 2.0.0
   * @category Array
   * @param {Array} array The array to modify.
   * @param {Array|Function|Object|string} [predicate=_.identity]
   *  The function invoked per iteration.
   * @returns {Array} Returns the new array of removed elements.
   * @example
   *
   * var array = [1, 2, 3, 4];
   * var evens = _.remove(array, function(n) {
   *   return n % 2 == 0;
   * });
   *
   * console.log(array);
   * // => [1, 3]
   *
   * console.log(evens);
   * // => [2, 4]
   */
  function remove(array, predicate) {
    var result = [];
    if (!(array && array.length)) {
      return result;
    }
    var index = -1,
        indexes = [],
        length = array.length;

    predicate = getIteratee(predicate, 3);
    while (++index < length) {
      var value = array[index];
      if (predicate(value, index, array)) {
        result.push(value);
        indexes.push(index);
      }
    }
    basePullAt(array, indexes);
    return result;
  }

  /**
   * Reverses `array` so that the first element becomes the last, the second
   * element becomes the second to last, and so on.
   *
   * **Note:** This method mutates `array` and is based on
   * [`Array#reverse`](https://mdn.io/Array/reverse).
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category Array
   * @param {Array} array The array to modify.
   * @returns {Array} Returns `array`.
   * @example
   *
   * var array = [1, 2, 3];
   *
   * _.reverse(array);
   * // => [3, 2, 1]
   *
   * console.log(array);
   * // => [3, 2, 1]
   */
  function reverse(array) {
    return array ? nativeReverse.call(array) : array;
  }

  /**
   * Creates a slice of `array` from `start` up to, but not including, `end`.
   *
   * **Note:** This method is used instead of
   * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are
   * returned.
   *
   * @static
   * @memberOf _
   * @since 3.0.0
   * @category Array
   * @param {Array} array The array to slice.
   * @param {number} [start=0] The start position.
   * @param {number} [end=array.length] The end position.
   * @returns {Array} Returns the slice of `array`.
   */
  function slice(array, start, end) {
    var length = array ? array.length : 0;
    if (!length) {
      return [];
    }
    if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {
      start = 0;
      end = length;
    }
    else {
      start = start == null ? 0 : toInteger(start);
      end = end === undefined ? length : toInteger(end);
    }
    return baseSlice(array, start, end);
  }

  /**
   * Uses a binary search to determine the lowest index at which `value`
   * should be inserted into `array` in order to maintain its sort order.
   *
   * @static
   * @memberOf _
   * @since 0.1.0
   * @category Array
   * @param {Array} array The sorted array to inspect.
   * @param {*} value The value to evaluate.
   * @returns {number} Returns the index at which `value` should be inserted
   *  into `array`.
   * @example
   *
   * _.sortedIndex([30, 50], 40);
   * // => 1
   */
  function sortedIndex(array, value) {
    return baseSortedIndex(array, value);
  }

  /**
   * This method is like `_.sortedIndex` except that it accepts `iteratee`
   * which is invoked for `value` and each element of `array` to compute their
   * sort ranking. The iteratee is invoked with one argument: (value).
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category Array
   * @param {Array} array The sorted array to inspect.
   * @param {*} value The value to evaluate.
   * @param {Array|Function|Object|string} [iteratee=_.identity]
   *  The iteratee invoked per element.
   * @returns {number} Returns the index at which `value` should be inserted
   *  into `array`.
   * @example
   *
   * var objects = [{ 'x': 4 }, { 'x': 5 }];
   *
   * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });
   * // => 0
   *
   * // The `_.property` iteratee shorthand.
   * _.sortedIndexBy(objects, { 'x': 4 }, 'x');
   * // => 0
   */
  function sortedIndexBy(array, value, iteratee) {
    return baseSortedIndexBy(array, value, getIteratee(iteratee));
  }

  /**
   * This method is like `_.indexOf` except that it performs a binary
   * search on a sorted `array`.
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category Array
   * @param {Array} array The array to search.
   * @param {*} value The value to search for.
   * @returns {number} Returns the index of the matched value, else `-1`.
   * @example
   *
   * _.sortedIndexOf([4, 5, 5, 5, 6], 5);
   * // => 1
   */
  function sortedIndexOf(array, value) {
    var length = array ? array.length : 0;
    if (length) {
      var index = baseSortedIndex(array, value);
      if (index < length && eq(array[index], value)) {
        return index;
      }
    }
    return -1;
  }

  /**
   * This method is like `_.sortedIndex` except that it returns the highest
   * index at which `value` should be inserted into `array` in order to
   * maintain its sort order.
   *
   * @static
   * @memberOf _
   * @since 3.0.0
   * @category Array
   * @param {Array} array The sorted array to inspect.
   * @param {*} value The value to evaluate.
   * @returns {number} Returns the index at which `value` should be inserted
   *  into `array`.
   * @example
   *
   * _.sortedLastIndex([4, 5, 5, 5, 6], 5);
   * // => 4
   */
  function sortedLastIndex(array, value) {
    return baseSortedIndex(array, value, true);
  }

  /**
   * This method is like `_.sortedLastIndex` except that it accepts `iteratee`
   * which is invoked for `value` and each element of `array` to compute their
   * sort ranking. The iteratee is invoked with one argument: (value).
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category Array
   * @param {Array} array The sorted array to inspect.
   * @param {*} value The value to evaluate.
   * @param {Array|Function|Object|string} [iteratee=_.identity]
   *  The iteratee invoked per element.
   * @returns {number} Returns the index at which `value` should be inserted
   *  into `array`.
   * @example
   *
   * var objects = [{ 'x': 4 }, { 'x': 5 }];
   *
   * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });
   * // => 1
   *
   * // The `_.property` iteratee shorthand.
   * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x');
   * // => 1
   */
  function sortedLastIndexBy(array, value, iteratee) {
    return baseSortedIndexBy(array, value, getIteratee(iteratee), true);
  }

  /**
   * This method is like `_.lastIndexOf` except that it performs a binary
   * search on a sorted `array`.
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category Array
   * @param {Array} array The array to search.
   * @param {*} value The value to search for.
   * @returns {number} Returns the index of the matched value, else `-1`.
   * @example
   *
   * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5);
   * // => 3
   */
  function sortedLastIndexOf(array, value) {
    var length = array ? array.length : 0;
    if (length) {
      var index = baseSortedIndex(array, value, true) - 1;
      if (eq(array[index], value)) {
        return index;
      }
    }
    return -1;
  }

  /**
   * This method is like `_.uniq` except that it's designed and optimized
   * for sorted arrays.
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category Array
   * @param {Array} array The array to inspect.
   * @returns {Array} Returns the new duplicate free array.
   * @example
   *
   * _.sortedUniq([1, 1, 2]);
   * // => [1, 2]
   */
  function sortedUniq(array) {
    return (array && array.length)
      ? baseSortedUniq(array)
      : [];
  }

  /**
   * This method is like `_.uniqBy` except that it's designed and optimized
   * for sorted arrays.
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category Array
   * @param {Array} array The array to inspect.
   * @param {Function} [iteratee] The iteratee invoked per element.
   * @returns {Array} Returns the new duplicate free array.
   * @example
   *
   * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);
   * // => [1.1, 2.3]
   */
  function sortedUniqBy(array, iteratee) {
    return (array && array.length)
      ? baseSortedUniq(array, getIteratee(iteratee))
      : [];
  }

  /**
   * Gets all but the first element of `array`.
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category Array
   * @param {Array} array The array to query.
   * @returns {Array} Returns the slice of `array`.
   * @example
   *
   * _.tail([1, 2, 3]);
   * // => [2, 3]
   */
  function tail(array) {
    return drop(array, 1);
  }

  /**
   * Creates a slice of `array` with `n` elements taken from the beginning.
   *
   * @static
   * @memberOf _
   * @since 0.1.0
   * @category Array
   * @param {Array} array The array to query.
   * @param {number} [n=1] The number of elements to take.
   * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
   * @returns {Array} Returns the slice of `array`.
   * @example
   *
   * _.take([1, 2, 3]);
   * // => [1]
   *
   * _.take([1, 2, 3], 2);
   * // => [1, 2]
   *
   * _.take([1, 2, 3], 5);
   * // => [1, 2, 3]
   *
   * _.take([1, 2, 3], 0);
   * // => []
   */
  function take(array, n, guard) {
    if (!(array && array.length)) {
      return [];
    }
    n = (guard || n === undefined) ? 1 : toInteger(n);
    return baseSlice(array, 0, n < 0 ? 0 : n);
  }

  /**
   * Creates a slice of `array` with `n` elements taken from the end.
   *
   * @static
   * @memberOf _
   * @since 3.0.0
   * @category Array
   * @param {Array} array The array to query.
   * @param {number} [n=1] The number of elements to take.
   * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
   * @returns {Array} Returns the slice of `array`.
   * @example
   *
   * _.takeRight([1, 2, 3]);
   * // => [3]
   *
   * _.takeRight([1, 2, 3], 2);
   * // => [2, 3]
   *
   * _.takeRight([1, 2, 3], 5);
   * // => [1, 2, 3]
   *
   * _.takeRight([1, 2, 3], 0);
   * // => []
   */
  function takeRight(array, n, guard) {
    var length = array ? array.length : 0;
    if (!length) {
      return [];
    }
    n = (guard || n === undefined) ? 1 : toInteger(n);
    n = length - n;
    return baseSlice(array, n < 0 ? 0 : n, length);
  }

  /**
   * Creates a slice of `array` with elements taken from the end. Elements are
   * taken until `predicate` returns falsey. The predicate is invoked with
   * three arguments: (value, index, array).
   *
   * @static
   * @memberOf _
   * @since 3.0.0
   * @category Array
   * @param {Array} array The array to query.
   * @param {Array|Function|Object|string} [predicate=_.identity]
   *  The function invoked per iteration.
   * @returns {Array} Returns the slice of `array`.
   * @example
   *
   * var users = [
   *   { 'user': 'barney',  'active': true },
   *   { 'user': 'fred',    'active': false },
   *   { 'user': 'pebbles', 'active': false }
   * ];
   *
   * _.takeRightWhile(users, function(o) { return !o.active; });
   * // => objects for ['fred', 'pebbles']
   *
   * // The `_.matches` iteratee shorthand.
   * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false });
   * // => objects for ['pebbles']
   *
   * // The `_.matchesProperty` iteratee shorthand.
   * _.takeRightWhile(users, ['active', false]);
   * // => objects for ['fred', 'pebbles']
   *
   * // The `_.property` iteratee shorthand.
   * _.takeRightWhile(users, 'active');
   * // => []
   */
  function takeRightWhile(array, predicate) {
    return (array && array.length)
      ? baseWhile(array, getIteratee(predicate, 3), false, true)
      : [];
  }

  /**
   * Creates a slice of `array` with elements taken from the beginning. Elements
   * are taken until `predicate` returns falsey. The predicate is invoked with
   * three arguments: (value, index, array).
   *
   * @static
   * @memberOf _
   * @since 3.0.0
   * @category Array
   * @param {Array} array The array to query.
   * @param {Array|Function|Object|string} [predicate=_.identity]
   *  The function invoked per iteration.
   * @returns {Array} Returns the slice of `array`.
   * @example
   *
   * var users = [
   *   { 'user': 'barney',  'active': false },
   *   { 'user': 'fred',    'active': false},
   *   { 'user': 'pebbles', 'active': true }
   * ];
   *
   * _.takeWhile(users, function(o) { return !o.active; });
   * // => objects for ['barney', 'fred']
   *
   * // The `_.matches` iteratee shorthand.
   * _.takeWhile(users, { 'user': 'barney', 'active': false });
   * // => objects for ['barney']
   *
   * // The `_.matchesProperty` iteratee shorthand.
   * _.takeWhile(users, ['active', false]);
   * // => objects for ['barney', 'fred']
   *
   * // The `_.property` iteratee shorthand.
   * _.takeWhile(users, 'active');
   * // => []
   */
  function takeWhile(array, predicate) {
    return (array && array.length)
      ? baseWhile(array, getIteratee(predicate, 3))
      : [];
  }

  /**
   * Creates an array of unique values, in order, from all given arrays using
   * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
   * for equality comparisons.
   *
   * @static
   * @memberOf _
   * @since 0.1.0
   * @category Array
   * @param {...Array} [arrays] The arrays to inspect.
   * @returns {Array} Returns the new array of combined values.
   * @example
   *
   * _.union([2], [1, 2]);
   * // => [2, 1]
   */
  var union = rest(function(arrays) {
    return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));
  });

  /**
   * This method is like `_.union` except that it accepts `iteratee` which is
   * invoked for each element of each `arrays` to generate the criterion by
   * which uniqueness is computed. The iteratee is invoked with one argument:
   * (value).
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category Array
   * @param {...Array} [arrays] The arrays to inspect.
   * @param {Array|Function|Object|string} [iteratee=_.identity]
   *  The iteratee invoked per element.
   * @returns {Array} Returns the new array of combined values.
   * @example
   *
   * _.unionBy([2.1], [1.2, 2.3], Math.floor);
   * // => [2.1, 1.2]
   *
   * // The `_.property` iteratee shorthand.
   * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
   * // => [{ 'x': 1 }, { 'x': 2 }]
   */
  var unionBy = rest(function(arrays) {
    var iteratee = last(arrays);
    if (isArrayLikeObject(iteratee)) {
      iteratee = undefined;
    }
    return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee));
  });

  /**
   * This method is like `_.union` except that it accepts `comparator` which
   * is invoked to compare elements of `arrays`. The comparator is invoked
   * with two arguments: (arrVal, othVal).
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category Array
   * @param {...Array} [arrays] The arrays to inspect.
   * @param {Function} [comparator] The comparator invoked per element.
   * @returns {Array} Returns the new array of combined values.
   * @example
   *
   * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
   * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
   *
   * _.unionWith(objects, others, _.isEqual);
   * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
   */
  var unionWith = rest(function(arrays) {
    var comparator = last(arrays);
    if (isArrayLikeObject(comparator)) {
      comparator = undefined;
    }
    return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator);
  });

  /**
   * 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 uniq(array) {
    return (array && array.length)
      ? baseUniq(array)
      : [];
  }

  /**
   * This method is like `_.uniq` except that it accepts `iteratee` which is
   * invoked for each element in `array` to generate the criterion by which
   * uniqueness is computed. The iteratee is invoked with one argument: (value).
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category Array
   * @param {Array} array The array to inspect.
   * @param {Array|Function|Object|string} [iteratee=_.identity]
   *  The iteratee invoked per element.
   * @returns {Array} Returns the new duplicate free array.
   * @example
   *
   * _.uniqBy([2.1, 1.2, 2.3], Math.floor);
   * // => [2.1, 1.2]
   *
   * // The `_.property` iteratee shorthand.
   * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');
   * // => [{ 'x': 1 }, { 'x': 2 }]
   */
  function uniqBy(array, iteratee) {
    return (array && array.length)
      ? baseUniq(array, getIteratee(iteratee))
      : [];
  }

  /**
   * This method is like `_.uniq` except that it accepts `comparator` which
   * is invoked to compare elements of `array`. The comparator is invoked with
   * two arguments: (arrVal, othVal).
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category Array
   * @param {Array} array The array to inspect.
   * @param {Function} [comparator] The comparator invoked per element.
   * @returns {Array} Returns the new duplicate free array.
   * @example
   *
   * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];
   *
   * _.uniqWith(objects, _.isEqual);
   * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]
   */
  function uniqWith(array, comparator) {
    return (array && array.length)
      ? baseUniq(array, undefined, comparator)
      : [];
  }

  /**
   * This method is like `_.zip` except that it accepts an array of grouped
   * elements and creates an array regrouping the elements to their pre-zip
   * configuration.
   *
   * @static
   * @memberOf _
   * @since 1.2.0
   * @category Array
   * @param {Array} array The array of grouped elements to process.
   * @returns {Array} Returns the new array of regrouped elements.
   * @example
   *
   * var zipped = _.zip(['fred', 'barney'], [30, 40], [true, false]);
   * // => [['fred', 30, true], ['barney', 40, false]]
   *
   * _.unzip(zipped);
   * // => [['fred', 'barney'], [30, 40], [true, false]]
   */
  function unzip(array) {
    if (!(array && array.length)) {
      return [];
    }
    var length = 0;
    array = arrayFilter(array, function(group) {
      if (isArrayLikeObject(group)) {
        length = nativeMax(group.length, length);
        return true;
      }
    });
    return baseTimes(length, function(index) {
      return arrayMap(array, baseProperty(index));
    });
  }

  /**
   * This method is like `_.unzip` except that it accepts `iteratee` to specify
   * how regrouped values should be combined. The iteratee is invoked with the
   * elements of each group: (...group).
   *
   * @static
   * @memberOf _
   * @since 3.8.0
   * @category Array
   * @param {Array} array The array of grouped elements to process.
   * @param {Function} [iteratee=_.identity] The function to combine
   *  regrouped values.
   * @returns {Array} Returns the new array of regrouped elements.
   * @example
   *
   * var zipped = _.zip([1, 2], [10, 20], [100, 200]);
   * // => [[1, 10, 100], [2, 20, 200]]
   *
   * _.unzipWith(zipped, _.add);
   * // => [3, 30, 300]
   */
  function unzipWith(array, iteratee) {
    if (!(array && array.length)) {
      return [];
    }
    var result = unzip(array);
    if (iteratee == null) {
      return result;
    }
    return arrayMap(result, function(group) {
      return apply(iteratee, undefined, group);
    });
  }

  /**
   * Creates an array excluding all given values using
   * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
   * for equality comparisons.
   *
   * @static
   * @memberOf _
   * @since 0.1.0
   * @category Array
   * @param {Array} array The array to inspect.
   * @param {...*} [values] The values to exclude.
   * @returns {Array} Returns the new array of filtered values.
   * @see _.difference, _.xor
   * @example
   *
   * _.without([2, 1, 2, 3], 1, 2);
   * // => [3]
   */
  var without = rest(function(array, values) {
    return isArrayLikeObject(array)
      ? baseDifference(array, values)
      : [];
  });

  /**
   * Creates an array of unique values that is the
   * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)
   * of the given arrays. The order of result values is determined by the order
   * they occur in the arrays.
   *
   * @static
   * @memberOf _
   * @since 2.4.0
   * @category Array
   * @param {...Array} [arrays] The arrays to inspect.
   * @returns {Array} Returns the new array of filtered values.
   * @see _.difference, _.without
   * @example
   *
   * _.xor([2, 1], [2, 3]);
   * // => [1, 3]
   */
  var xor = rest(function(arrays) {
    return baseXor(arrayFilter(arrays, isArrayLikeObject));
  });

  /**
   * This method is like `_.xor` except that it accepts `iteratee` which is
   * invoked for each element of each `arrays` to generate the criterion by
   * which by which they're compared. The iteratee is invoked with one argument:
   * (value).
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category Array
   * @param {...Array} [arrays] The arrays to inspect.
   * @param {Array|Function|Object|string} [iteratee=_.identity]
   *  The iteratee invoked per element.
   * @returns {Array} Returns the new array of filtered values.
   * @example
   *
   * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor);
   * // => [1.2, 3.4]
   *
   * // The `_.property` iteratee shorthand.
   * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
   * // => [{ 'x': 2 }]
   */
  var xorBy = rest(function(arrays) {
    var iteratee = last(arrays);
    if (isArrayLikeObject(iteratee)) {
      iteratee = undefined;
    }
    return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee));
  });

  /**
   * This method is like `_.xor` except that it accepts `comparator` which is
   * invoked to compare elements of `arrays`. The comparator is invoked with
   * two arguments: (arrVal, othVal).
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category Array
   * @param {...Array} [arrays] The arrays to inspect.
   * @param {Function} [comparator] The comparator invoked per element.
   * @returns {Array} Returns the new array of filtered values.
   * @example
   *
   * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
   * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
   *
   * _.xorWith(objects, others, _.isEqual);
   * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
   */
  var xorWith = rest(function(arrays) {
    var comparator = last(arrays);
    if (isArrayLikeObject(comparator)) {
      comparator = undefined;
    }
    return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator);
  });

  /**
   * Creates an array of grouped elements, the first of which contains the
   * first elements of the given arrays, the second of which contains the
   * second elements of the given arrays, and so on.
   *
   * @static
   * @memberOf _
   * @since 0.1.0
   * @category Array
   * @param {...Array} [arrays] The arrays to process.
   * @returns {Array} Returns the new array of grouped elements.
   * @example
   *
   * _.zip(['fred', 'barney'], [30, 40], [true, false]);
   * // => [['fred', 30, true], ['barney', 40, false]]
   */
  var zip = rest(unzip);

  /**
   * This method is like `_.fromPairs` except that it accepts two arrays,
   * one of property identifiers and one of corresponding values.
   *
   * @static
   * @memberOf _
   * @since 0.4.0
   * @category Array
   * @param {Array} [props=[]] The property identifiers.
   * @param {Array} [values=[]] The property values.
   * @returns {Object} Returns the new object.
   * @example
   *
   * _.zipObject(['a', 'b'], [1, 2]);
   * // => { 'a': 1, 'b': 2 }
   */
  function zipObject(props, values) {
    return baseZipObject(props || [], values || [], assignValue);
  }

  /**
   * This method is like `_.zipObject` except that it supports property paths.
   *
   * @static
   * @memberOf _
   * @since 4.1.0
   * @category Array
   * @param {Array} [props=[]] The property identifiers.
   * @param {Array} [values=[]] The property values.
   * @returns {Object} Returns the new object.
   * @example
   *
   * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]);
   * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } }
   */
  function zipObjectDeep(props, values) {
    return baseZipObject(props || [], values || [], baseSet);
  }

  /**
   * This method is like `_.zip` except that it accepts `iteratee` to specify
   * how grouped values should be combined. The iteratee is invoked with the
   * elements of each group: (...group).
   *
   * @static
   * @memberOf _
   * @since 3.8.0
   * @category Array
   * @param {...Array} [arrays] The arrays to process.
   * @param {Function} [iteratee=_.identity] The function to combine grouped values.
   * @returns {Array} Returns the new array of grouped elements.
   * @example
   *
   * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) {
   *   return a + b + c;
   * });
   * // => [111, 222]
   */
  var zipWith = rest(function(arrays) {
    var length = arrays.length,
        iteratee = length > 1 ? arrays[length - 1] : undefined;

    iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined;
    return unzipWith(arrays, iteratee);
  });

  /*------------------------------------------------------------------------*/

  /**
   * Creates a `lodash` wrapper instance that wraps `value` with explicit method
   * chain sequences enabled. The result of such sequences must be unwrapped
   * with `_#value`.
   *
   * @static
   * @memberOf _
   * @since 1.3.0
   * @category Seq
   * @param {*} value The value to wrap.
   * @returns {Object} Returns the new `lodash` wrapper instance.
   * @example
   *
   * var users = [
   *   { 'user': 'barney',  'age': 36 },
   *   { 'user': 'fred',    'age': 40 },
   *   { 'user': 'pebbles', 'age': 1 }
   * ];
   *
   * var youngest = _
   *   .chain(users)
   *   .sortBy('age')
   *   .map(function(o) {
   *     return o.user + ' is ' + o.age;
   *   })
   *   .head()
   *   .value();
   * // => 'pebbles is 1'
   */
  function chain(value) {
    var result = lodash(value);
    result.__chain__ = true;
    return result;
  }

  /**
   * This method invokes `interceptor` and returns `value`. The interceptor
   * is invoked with one argument; (value). The purpose of this method is to
   * "tap into" a method chain sequence in order to modify intermediate results.
   *
   * @static
   * @memberOf _
   * @since 0.1.0
   * @category Seq
   * @param {*} value The value to provide to `interceptor`.
   * @param {Function} interceptor The function to invoke.
   * @returns {*} Returns `value`.
   * @example
   *
   * _([1, 2, 3])
   *  .tap(function(array) {
   *    // Mutate input array.
   *    array.pop();
   *  })
   *  .reverse()
   *  .value();
   * // => [2, 1]
   */
  function tap(value, interceptor) {
    interceptor(value);
    return value;
  }

  /**
   * This method is like `_.tap` except that it returns the result of `interceptor`.
   * The purpose of this method is to "pass thru" values replacing intermediate
   * results in a method chain sequence.
   *
   * @static
   * @memberOf _
   * @since 3.0.0
   * @category Seq
   * @param {*} value The value to provide to `interceptor`.
   * @param {Function} interceptor The function to invoke.
   * @returns {*} Returns the result of `interceptor`.
   * @example
   *
   * _('  abc  ')
   *  .chain()
   *  .trim()
   *  .thru(function(value) {
   *    return [value];
   *  })
   *  .value();
   * // => ['abc']
   */
  function thru(value, interceptor) {
    return interceptor(value);
  }

  /**
   * This method is the wrapper version of `_.at`.
   *
   * @name at
   * @memberOf _
   * @since 1.0.0
   * @category Seq
   * @param {...(string|string[])} [paths] The property paths of elements to pick.
   * @returns {Object} Returns the new `lodash` wrapper instance.
   * @example
   *
   * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
   *
   * _(object).at(['a[0].b.c', 'a[1]']).value();
   * // => [3, 4]
   */
  var wrapperAt = rest(function(paths) {
    paths = baseFlatten(paths, 1);
    var length = paths.length,
        start = length ? paths[0] : 0,
        value = this.__wrapped__,
        interceptor = function(object) { return baseAt(object, paths); };

    if (length > 1 || this.__actions__.length ||
        !(value instanceof LazyWrapper) || !isIndex(start)) {
      return this.thru(interceptor);
    }
    value = value.slice(start, +start + (length ? 1 : 0));
    value.__actions__.push({
      'func': thru,
      'args': [interceptor],
      'thisArg': undefined
    });
    return new LodashWrapper(value, this.__chain__).thru(function(array) {
      if (length && !array.length) {
        array.push(undefined);
      }
      return array;
    });
  });

  /**
   * Creates a `lodash` wrapper instance with explicit method chain sequences enabled.
   *
   * @name chain
   * @memberOf _
   * @since 0.1.0
   * @category Seq
   * @returns {Object} Returns the new `lodash` wrapper instance.
   * @example
   *
   * var users = [
   *   { 'user': 'barney', 'age': 36 },
   *   { 'user': 'fred',   'age': 40 }
   * ];
   *
   * // A sequence without explicit chaining.
   * _(users).head();
   * // => { 'user': 'barney', 'age': 36 }
   *
   * // A sequence with explicit chaining.
   * _(users)
   *   .chain()
   *   .head()
   *   .pick('user')
   *   .value();
   * // => { 'user': 'barney' }
   */
  function wrapperChain() {
    return chain(this);
  }

  /**
   * Executes the chain sequence and returns the wrapped result.
   *
   * @name commit
   * @memberOf _
   * @since 3.2.0
   * @category Seq
   * @returns {Object} Returns the new `lodash` wrapper instance.
   * @example
   *
   * var array = [1, 2];
   * var wrapped = _(array).push(3);
   *
   * console.log(array);
   * // => [1, 2]
   *
   * wrapped = wrapped.commit();
   * console.log(array);
   * // => [1, 2, 3]
   *
   * wrapped.last();
   * // => 3
   *
   * console.log(array);
   * // => [1, 2, 3]
   */
  function wrapperCommit() {
    return new LodashWrapper(this.value(), this.__chain__);
  }

  /**
   * Gets the next value on a wrapped object following the
   * [iterator protocol](https://mdn.io/iteration_protocols#iterator).
   *
   * @name next
   * @memberOf _
   * @since 4.0.0
   * @category Seq
   * @returns {Object} Returns the next iterator value.
   * @example
   *
   * var wrapped = _([1, 2]);
   *
   * wrapped.next();
   * // => { 'done': false, 'value': 1 }
   *
   * wrapped.next();
   * // => { 'done': false, 'value': 2 }
   *
   * wrapped.next();
   * // => { 'done': true, 'value': undefined }
   */
  function wrapperNext() {
    if (this.__values__ === undefined) {
      this.__values__ = toArray(this.value());
    }
    var done = this.__index__ >= this.__values__.length,
        value = done ? undefined : this.__values__[this.__index__++];

    return { 'done': done, 'value': value };
  }

  /**
   * Enables the wrapper to be iterable.
   *
   * @name Symbol.iterator
   * @memberOf _
   * @since 4.0.0
   * @category Seq
   * @returns {Object} Returns the wrapper object.
   * @example
   *
   * var wrapped = _([1, 2]);
   *
   * wrapped[Symbol.iterator]() === wrapped;
   * // => true
   *
   * Array.from(wrapped);
   * // => [1, 2]
   */
  function wrapperToIterator() {
    return this;
  }

  /**
   * Creates a clone of the chain sequence planting `value` as the wrapped value.
   *
   * @name plant
   * @memberOf _
   * @since 3.2.0
   * @category Seq
   * @param {*} value The value to plant.
   * @returns {Object} Returns the new `lodash` wrapper instance.
   * @example
   *
   * function square(n) {
   *   return n * n;
   * }
   *
   * var wrapped = _([1, 2]).map(square);
   * var other = wrapped.plant([3, 4]);
   *
   * other.value();
   * // => [9, 16]
   *
   * wrapped.value();
   * // => [1, 4]
   */
  function wrapperPlant(value) {
    var result,
        parent = this;

    while (parent instanceof baseLodash) {
      var clone = wrapperClone(parent);
      clone.__index__ = 0;
      clone.__values__ = undefined;
      if (result) {
        previous.__wrapped__ = clone;
      } else {
        result = clone;
      }
      var previous = clone;
      parent = parent.__wrapped__;
    }
    previous.__wrapped__ = value;
    return result;
  }

  /**
   * This method is the wrapper version of `_.reverse`.
   *
   * **Note:** This method mutates the wrapped array.
   *
   * @name reverse
   * @memberOf _
   * @since 0.1.0
   * @category Seq
   * @returns {Object} Returns the new `lodash` wrapper instance.
   * @example
   *
   * var array = [1, 2, 3];
   *
   * _(array).reverse().value()
   * // => [3, 2, 1]
   *
   * console.log(array);
   * // => [3, 2, 1]
   */
  function wrapperReverse() {
    var value = this.__wrapped__;
    if (value instanceof LazyWrapper) {
      var wrapped = value;
      if (this.__actions__.length) {
        wrapped = new LazyWrapper(this);
      }
      wrapped = wrapped.reverse();
      wrapped.__actions__.push({
        'func': thru,
        'args': [reverse],
        'thisArg': undefined
      });
      return new LodashWrapper(wrapped, this.__chain__);
    }
    return this.thru(reverse);
  }

  /**
   * Executes the chain sequence to resolve the unwrapped value.
   *
   * @name value
   * @memberOf _
   * @since 0.1.0
   * @alias toJSON, valueOf
   * @category Seq
   * @returns {*} Returns the resolved unwrapped value.
   * @example
   *
   * _([1, 2, 3]).value();
   * // => [1, 2, 3]
   */
  function wrapperValue() {
    return baseWrapperValue(this.__wrapped__, this.__actions__);
  }

  /*------------------------------------------------------------------------*/

  /**
   * Creates an object composed of keys generated from the results of running
   * each element of `collection` thru `iteratee`. The corresponding value of
   * each key is the number of times the key was returned by `iteratee`. The
   * iteratee is invoked with one argument: (value).
   *
   * @static
   * @memberOf _
   * @since 0.5.0
   * @category Collection
   * @param {Array|Object} collection The collection to iterate over.
   * @param {Array|Function|Object|string} [iteratee=_.identity]
   *  The iteratee to transform keys.
   * @returns {Object} Returns the composed aggregate object.
   * @example
   *
   * _.countBy([6.1, 4.2, 6.3], Math.floor);
   * // => { '4': 1, '6': 2 }
   *
   * // The `_.property` iteratee shorthand.
   * _.countBy(['one', 'two', 'three'], 'length');
   * // => { '3': 2, '5': 1 }
   */
  var countBy = createAggregator(function(result, value, key) {
    hasOwnProperty.call(result, key) ? ++result[key] : (result[key] = 1);
  });

  /**
   * Checks if `predicate` returns truthy for **all** elements of `collection`.
   * Iteration is stopped once `predicate` returns falsey. The predicate is
   * invoked with three arguments: (value, index|key, collection).
   *
   * @static
   * @memberOf _
   * @since 0.1.0
   * @category Collection
   * @param {Array|Object} collection The collection to iterate over.
   * @param {Array|Function|Object|string} [predicate=_.identity]
   *  The function invoked per iteration.
   * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
   * @returns {boolean} Returns `true` if all elements pass the predicate check,
   *  else `false`.
   * @example
   *
   * _.every([true, 1, null, 'yes'], Boolean);
   * // => false
   *
   * var users = [
   *   { 'user': 'barney', 'age': 36, 'active': false },
   *   { 'user': 'fred',   'age': 40, 'active': false }
   * ];
   *
   * // The `_.matches` iteratee shorthand.
   * _.every(users, { 'user': 'barney', 'active': false });
   * // => false
   *
   * // The `_.matchesProperty` iteratee shorthand.
   * _.every(users, ['active', false]);
   * // => true
   *
   * // The `_.property` iteratee shorthand.
   * _.every(users, 'active');
   * // => false
   */
  function every(collection, predicate, guard) {
    var func = isArray(collection) ? arrayEvery : baseEvery;
    if (guard && isIterateeCall(collection, predicate, guard)) {
      predicate = undefined;
    }
    return func(collection, getIteratee(predicate, 3));
  }

  /**
   * Iterates over elements of `collection`, returning an array of all elements
   * `predicate` returns truthy for. The predicate is invoked with three
   * arguments: (value, index|key, collection).
   *
   * @static
   * @memberOf _
   * @since 0.1.0
   * @category Collection
   * @param {Array|Object} collection The collection to iterate over.
   * @param {Array|Function|Object|string} [predicate=_.identity]
   *  The function invoked per iteration.
   * @returns {Array} Returns the new filtered array.
   * @see _.reject
   * @example
   *
   * var users = [
   *   { 'user': 'barney', 'age': 36, 'active': true },
   *   { 'user': 'fred',   'age': 40, 'active': false }
   * ];
   *
   * _.filter(users, function(o) { return !o.active; });
   * // => objects for ['fred']
   *
   * // The `_.matches` iteratee shorthand.
   * _.filter(users, { 'age': 36, 'active': true });
   * // => objects for ['barney']
   *
   * // The `_.matchesProperty` iteratee shorthand.
   * _.filter(users, ['active', false]);
   * // => objects for ['fred']
   *
   * // The `_.property` iteratee shorthand.
   * _.filter(users, 'active');
   * // => objects for ['barney']
   */
  function filter(collection, predicate) {
    var func = isArray(collection) ? arrayFilter : baseFilter;
    return func(collection, getIteratee(predicate, 3));
  }

  /**
   * Iterates over elements of `collection`, returning the first element
   * `predicate` returns truthy for. The predicate is invoked with three
   * arguments: (value, index|key, collection).
   *
   * @static
   * @memberOf _
   * @since 0.1.0
   * @category Collection
   * @param {Array|Object} collection The collection to search.
   * @param {Array|Function|Object|string} [predicate=_.identity]
   *  The function invoked per iteration.
   * @param {number} [fromIndex=0] The index to search from.
   * @returns {*} Returns the matched element, else `undefined`.
   * @example
   *
   * var users = [
   *   { 'user': 'barney',  'age': 36, 'active': true },
   *   { 'user': 'fred',    'age': 40, 'active': false },
   *   { 'user': 'pebbles', 'age': 1,  'active': true }
   * ];
   *
   * _.find(users, function(o) { return o.age < 40; });
   * // => object for 'barney'
   *
   * // The `_.matches` iteratee shorthand.
   * _.find(users, { 'age': 1, 'active': true });
   * // => object for 'pebbles'
   *
   * // The `_.matchesProperty` iteratee shorthand.
   * _.find(users, ['active', false]);
   * // => object for 'fred'
   *
   * // The `_.property` iteratee shorthand.
   * _.find(users, 'active');
   * // => object for 'barney'
   */
  var find = createFind(findIndex);

  /**
   * This method is like `_.find` except that it iterates over elements of
   * `collection` from right to left.
   *
   * @static
   * @memberOf _
   * @since 2.0.0
   * @category Collection
   * @param {Array|Object} collection The collection to search.
   * @param {Array|Function|Object|string} [predicate=_.identity]
   *  The function invoked per iteration.
   * @param {number} [fromIndex=collection.length-1] The index to search from.
   * @returns {*} Returns the matched element, else `undefined`.
   * @example
   *
   * _.findLast([1, 2, 3, 4], function(n) {
   *   return n % 2 == 1;
   * });
   * // => 3
   */
  var findLast = createFind(findLastIndex);

  /**
   * Creates a flattened array of values by running each element in `collection`
   * thru `iteratee` and flattening the mapped results. The iteratee is invoked
   * with three arguments: (value, index|key, collection).
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category Collection
   * @param {Array|Object} collection The collection to iterate over.
   * @param {Array|Function|Object|string} [iteratee=_.identity]
   *  The function invoked per iteration.
   * @returns {Array} Returns the new flattened array.
   * @example
   *
   * function duplicate(n) {
   *   return [n, n];
   * }
   *
   * _.flatMap([1, 2], duplicate);
   * // => [1, 1, 2, 2]
   */
  function flatMap(collection, iteratee) {
    return baseFlatten(map(collection, iteratee), 1);
  }

  /**
   * This method is like `_.flatMap` except that it recursively flattens the
   * mapped results.
   *
   * @static
   * @memberOf _
   * @since 4.7.0
   * @category Collection
   * @param {Array|Object} collection The collection to iterate over.
   * @param {Array|Function|Object|string} [iteratee=_.identity]
   *  The function invoked per iteration.
   * @returns {Array} Returns the new flattened array.
   * @example
   *
   * function duplicate(n) {
   *   return [[[n, n]]];
   * }
   *
   * _.flatMapDeep([1, 2], duplicate);
   * // => [1, 1, 2, 2]
   */
  function flatMapDeep(collection, iteratee) {
    return baseFlatten(map(collection, iteratee), INFINITY);
  }

  /**
   * This method is like `_.flatMap` except that it recursively flattens the
   * mapped results up to `depth` times.
   *
   * @static
   * @memberOf _
   * @since 4.7.0
   * @category Collection
   * @param {Array|Object} collection The collection to iterate over.
   * @param {Array|Function|Object|string} [iteratee=_.identity]
   *  The function invoked per iteration.
   * @param {number} [depth=1] The maximum recursion depth.
   * @returns {Array} Returns the new flattened array.
   * @example
   *
   * function duplicate(n) {
   *   return [[[n, n]]];
   * }
   *
   * _.flatMapDepth([1, 2], duplicate, 2);
   * // => [[1, 1], [2, 2]]
   */
  function flatMapDepth(collection, iteratee, depth) {
    depth = depth === undefined ? 1 : toInteger(depth);
    return baseFlatten(map(collection, iteratee), depth);
  }

  /**
   * 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, getIteratee(iteratee, 3));
  }

  /**
   * This method is like `_.forEach` except that it iterates over elements of
   * `collection` from right to left.
   *
   * @static
   * @memberOf _
   * @since 2.0.0
   * @alias eachRight
   * @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 _.forEach
   * @example
   *
   * _.forEachRight([1, 2], function(value) {
   *   console.log(value);
   * });
   * // => Logs `2` then `1`.
   */
  function forEachRight(collection, iteratee) {
    var func = isArray(collection) ? arrayEachRight : baseEachRight;
    return func(collection, getIteratee(iteratee, 3));
  }

  /**
   * Creates an object composed of keys generated from the results of running
   * each element of `collection` thru `iteratee`. The order of grouped values
   * is determined by the order they occur in `collection`. The corresponding
   * value of each key is an array of elements responsible for generating the
   * key. The iteratee is invoked with one argument: (value).
   *
   * @static
   * @memberOf _
   * @since 0.1.0
   * @category Collection
   * @param {Array|Object} collection The collection to iterate over.
   * @param {Array|Function|Object|string} [iteratee=_.identity]
   *  The iteratee to transform keys.
   * @returns {Object} Returns the composed aggregate object.
   * @example
   *
   * _.groupBy([6.1, 4.2, 6.3], Math.floor);
   * // => { '4': [4.2], '6': [6.1, 6.3] }
   *
   * // The `_.property` iteratee shorthand.
   * _.groupBy(['one', 'two', 'three'], 'length');
   * // => { '3': ['one', 'two'], '5': ['three'] }
   */
  var groupBy = createAggregator(function(result, value, key) {
    if (hasOwnProperty.call(result, key)) {
      result[key].push(value);
    } else {
      result[key] = [value];
    }
  });

  /**
   * 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 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);
  }

  /**
   * Invokes the method at `path` of each element in `collection`, returning
   * an array of the results of each invoked method. Any additional arguments
   * are provided to each invoked method. If `methodName` is a function, it's
   * invoked for and `this` bound to, each element in `collection`.
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category Collection
   * @param {Array|Object} collection The collection to iterate over.
   * @param {Array|Function|string} path The path of the method to invoke or
   *  the function invoked per iteration.
   * @param {...*} [args] The arguments to invoke each method with.
   * @returns {Array} Returns the array of results.
   * @example
   *
   * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort');
   * // => [[1, 5, 7], [1, 2, 3]]
   *
   * _.invokeMap([123, 456], String.prototype.split, '');
   * // => [['1', '2', '3'], ['4', '5', '6']]
   */
  var invokeMap = rest(function(collection, path, args) {
    var index = -1,
        isFunc = typeof path == 'function',
        isProp = isKey(path),
        result = isArrayLike(collection) ? Array(collection.length) : [];

    baseEach(collection, function(value) {
      var func = isFunc ? path : ((isProp && value != null) ? value[path] : undefined);
      result[++index] = func ? apply(func, value, args) : baseInvoke(value, path, args);
    });
    return result;
  });

  /**
   * Creates an object composed of keys generated from the results of running
   * each element of `collection` thru `iteratee`. The corresponding value of
   * each key is the last element responsible for generating the key. The
   * iteratee is invoked with one argument: (value).
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category Collection
   * @param {Array|Object} collection The collection to iterate over.
   * @param {Array|Function|Object|string} [iteratee=_.identity]
   *  The iteratee to transform keys.
   * @returns {Object} Returns the composed aggregate object.
   * @example
   *
   * var array = [
   *   { 'dir': 'left', 'code': 97 },
   *   { 'dir': 'right', 'code': 100 }
   * ];
   *
   * _.keyBy(array, function(o) {
   *   return String.fromCharCode(o.code);
   * });
   * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }
   *
   * _.keyBy(array, 'dir');
   * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }
   */
  var keyBy = createAggregator(function(result, value, key) {
    result[key] = value;
  });

  /**
   * Creates an array of values by running each element in `collection` thru
   * `iteratee`. The iteratee is invoked with three arguments:
   * (value, index|key, collection).
   *
   * Many lodash methods are guarded to work as iteratees for methods like
   * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.
   *
   * The guarded methods are:
   * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,
   * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,
   * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,
   * `template`, `trim`, `trimEnd`, `trimStart`, and `words`
   *
   * @static
   * @memberOf _
   * @since 0.1.0
   * @category Collection
   * @param {Array|Object} collection The collection to iterate over.
   * @param {Array|Function|Object|string} [iteratee=_.identity]
   *  The function invoked per iteration.
   * @returns {Array} Returns the new mapped array.
   * @example
   *
   * function square(n) {
   *   return n * n;
   * }
   *
   * _.map([4, 8], square);
   * // => [16, 64]
   *
   * _.map({ 'a': 4, 'b': 8 }, square);
   * // => [16, 64] (iteration order is not guaranteed)
   *
   * var users = [
   *   { 'user': 'barney' },
   *   { 'user': 'fred' }
   * ];
   *
   * // The `_.property` iteratee shorthand.
   * _.map(users, 'user');
   * // => ['barney', 'fred']
   */
  function map(collection, iteratee) {
    var func = isArray(collection) ? arrayMap : baseMap;
    return func(collection, getIteratee(iteratee, 3));
  }

  /**
   * This method is like `_.sortBy` except that it allows specifying the sort
   * orders of the iteratees to sort by. If `orders` is unspecified, all values
   * are sorted in ascending order. Otherwise, specify an order of "desc" for
   * descending or "asc" for ascending sort order of corresponding values.
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category Collection
   * @param {Array|Object} collection The collection to iterate over.
   * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]]
   *  The iteratees to sort by.
   * @param {string[]} [orders] The sort orders of `iteratees`.
   * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
   * @returns {Array} Returns the new sorted array.
   * @example
   *
   * var users = [
   *   { 'user': 'fred',   'age': 48 },
   *   { 'user': 'barney', 'age': 34 },
   *   { 'user': 'fred',   'age': 40 },
   *   { 'user': 'barney', 'age': 36 }
   * ];
   *
   * // Sort by `user` in ascending order and by `age` in descending order.
   * _.orderBy(users, ['user', 'age'], ['asc', 'desc']);
   * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
   */
  function orderBy(collection, iteratees, orders, guard) {
    if (collection == null) {
      return [];
    }
    if (!isArray(iteratees)) {
      iteratees = iteratees == null ? [] : [iteratees];
    }
    orders = guard ? undefined : orders;
    if (!isArray(orders)) {
      orders = orders == null ? [] : [orders];
    }
    return baseOrderBy(collection, iteratees, orders);
  }

  /**
   * Creates an array of elements split into two groups, the first of which
   * contains elements `predicate` returns truthy for, the second of which
   * contains elements `predicate` returns falsey for. The predicate is
   * invoked with one argument: (value).
   *
   * @static
   * @memberOf _
   * @since 3.0.0
   * @category Collection
   * @param {Array|Object} collection The collection to iterate over.
   * @param {Array|Function|Object|string} [predicate=_.identity]
   *  The function invoked per iteration.
   * @returns {Array} Returns the array of grouped elements.
   * @example
   *
   * var users = [
   *   { 'user': 'barney',  'age': 36, 'active': false },
   *   { 'user': 'fred',    'age': 40, 'active': true },
   *   { 'user': 'pebbles', 'age': 1,  'active': false }
   * ];
   *
   * _.partition(users, function(o) { return o.active; });
   * // => objects for [['fred'], ['barney', 'pebbles']]
   *
   * // The `_.matches` iteratee shorthand.
   * _.partition(users, { 'age': 1, 'active': false });
   * // => objects for [['pebbles'], ['barney', 'fred']]
   *
   * // The `_.matchesProperty` iteratee shorthand.
   * _.partition(users, ['active', false]);
   * // => objects for [['barney', 'pebbles'], ['fred']]
   *
   * // The `_.property` iteratee shorthand.
   * _.partition(users, 'active');
   * // => objects for [['fred'], ['barney', 'pebbles']]
   */
  var partition = createAggregator(function(result, value, key) {
    result[key ? 0 : 1].push(value);
  }, function() { return [[], []]; });

  /**
   * Reduces `collection` to a value which is the accumulated result of running
   * each element in `collection` thru `iteratee`, where each successive
   * invocation is supplied the return value of the previous. If `accumulator`
   * is not given, the first element of `collection` is used as the initial
   * value. The iteratee is invoked with four arguments:
   * (accumulator, value, index|key, collection).
   *
   * Many lodash methods are guarded to work as iteratees for methods like
   * `_.reduce`, `_.reduceRight`, and `_.transform`.
   *
   * The guarded methods are:
   * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,
   * and `sortBy`
   *
   * @static
   * @memberOf _
   * @since 0.1.0
   * @category Collection
   * @param {Array|Object} collection The collection to iterate over.
   * @param {Function} [iteratee=_.identity] The function invoked per iteration.
   * @param {*} [accumulator] The initial value.
   * @returns {*} Returns the accumulated value.
   * @see _.reduceRight
   * @example
   *
   * _.reduce([1, 2], function(sum, n) {
   *   return sum + n;
   * }, 0);
   * // => 3
   *
   * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
   *   (result[value] || (result[value] = [])).push(key);
   *   return result;
   * }, {});
   * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)
   */
  function reduce(collection, iteratee, accumulator) {
    var func = isArray(collection) ? arrayReduce : baseReduce,
        initAccum = arguments.length < 3;

    return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach);
  }

  /**
   * This method is like `_.reduce` except that it iterates over elements of
   * `collection` from right to left.
   *
   * @static
   * @memberOf _
   * @since 0.1.0
   * @category Collection
   * @param {Array|Object} collection The collection to iterate over.
   * @param {Function} [iteratee=_.identity] The function invoked per iteration.
   * @param {*} [accumulator] The initial value.
   * @returns {*} Returns the accumulated value.
   * @see _.reduce
   * @example
   *
   * var array = [[0, 1], [2, 3], [4, 5]];
   *
   * _.reduceRight(array, function(flattened, other) {
   *   return flattened.concat(other);
   * }, []);
   * // => [4, 5, 2, 3, 0, 1]
   */
  function reduceRight(collection, iteratee, accumulator) {
    var func = isArray(collection) ? arrayReduceRight : baseReduce,
        initAccum = arguments.length < 3;

    return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight);
  }

  /**
   * The opposite of `_.filter`; this method returns the elements of `collection`
   * that `predicate` does **not** return truthy for.
   *
   * @static
   * @memberOf _
   * @since 0.1.0
   * @category Collection
   * @param {Array|Object} collection The collection to iterate over.
   * @param {Array|Function|Object|string} [predicate=_.identity]
   *  The function invoked per iteration.
   * @returns {Array} Returns the new filtered array.
   * @see _.filter
   * @example
   *
   * var users = [
   *   { 'user': 'barney', 'age': 36, 'active': false },
   *   { 'user': 'fred',   'age': 40, 'active': true }
   * ];
   *
   * _.reject(users, function(o) { return !o.active; });
   * // => objects for ['fred']
   *
   * // The `_.matches` iteratee shorthand.
   * _.reject(users, { 'age': 40, 'active': true });
   * // => objects for ['barney']
   *
   * // The `_.matchesProperty` iteratee shorthand.
   * _.reject(users, ['active', false]);
   * // => objects for ['fred']
   *
   * // The `_.property` iteratee shorthand.
   * _.reject(users, 'active');
   * // => objects for ['barney']
   */
  function reject(collection, predicate) {
    var func = isArray(collection) ? arrayFilter : baseFilter;
    predicate = getIteratee(predicate, 3);
    return func(collection, function(value, index, collection) {
      return !predicate(value, index, collection);
    });
  }

  /**
   * Gets a random element from `collection`.
   *
   * @static
   * @memberOf _
   * @since 2.0.0
   * @category Collection
   * @param {Array|Object} collection The collection to sample.
   * @returns {*} Returns the random element.
   * @example
   *
   * _.sample([1, 2, 3, 4]);
   * // => 2
   */
  function sample(collection) {
    var array = isArrayLike(collection) ? collection : values(collection),
        length = array.length;

    return length > 0 ? array[baseRandom(0, length - 1)] : undefined;
  }

  /**
   * Gets `n` random elements at unique keys from `collection` up to the
   * size of `collection`.
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category Collection
   * @param {Array|Object} collection The collection to sample.
   * @param {number} [n=1] The number of elements to sample.
   * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
   * @returns {Array} Returns the random elements.
   * @example
   *
   * _.sampleSize([1, 2, 3], 2);
   * // => [3, 1]
   *
   * _.sampleSize([1, 2, 3], 4);
   * // => [2, 3, 1]
   */
  function sampleSize(collection, n, guard) {
    var index = -1,
        result = toArray(collection),
        length = result.length,
        lastIndex = length - 1;

    if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) {
      n = 1;
    } else {
      n = baseClamp(toInteger(n), 0, length);
    }
    while (++index < n) {
      var rand = baseRandom(index, lastIndex),
          value = result[rand];

      result[rand] = result[index];
      result[index] = value;
    }
    result.length = n;
    return result;
  }

  /**
   * Creates an array of shuffled values, using a version of the
   * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle).
   *
   * @static
   * @memberOf _
   * @since 0.1.0
   * @category Collection
   * @param {Array|Object} collection The collection to shuffle.
   * @returns {Array} Returns the new shuffled array.
   * @example
   *
   * _.shuffle([1, 2, 3, 4]);
   * // => [4, 1, 3, 2]
   */
  function shuffle(collection) {
    return sampleSize(collection, MAX_ARRAY_LENGTH);
  }

  /**
   * Gets the size of `collection` by returning its length for array-like
   * values or the number of own enumerable string keyed properties for objects.
   *
   * @static
   * @memberOf _
   * @since 0.1.0
   * @category Collection
   * @param {Array|Object} collection The collection to inspect.
   * @returns {number} Returns the collection size.
   * @example
   *
   * _.size([1, 2, 3]);
   * // => 3
   *
   * _.size({ 'a': 1, 'b': 2 });
   * // => 2
   *
   * _.size('pebbles');
   * // => 7
   */
  function size(collection) {
    if (collection == null) {
      return 0;
    }
    if (isArrayLike(collection)) {
      var result = collection.length;
      return (result && isString(collection)) ? stringSize(collection) : result;
    }
    if (isObjectLike(collection)) {
      var tag = getTag(collection);
      if (tag == mapTag || tag == setTag) {
        return collection.size;
      }
    }
    return keys(collection).length;
  }

  /**
   * Checks if `predicate` returns truthy for **any** element of `collection`.
   * Iteration is stopped once `predicate` returns truthy. The predicate is
   * invoked with three arguments: (value, index|key, collection).
   *
   * @static
   * @memberOf _
   * @since 0.1.0
   * @category Collection
   * @param {Array|Object} collection The collection to iterate over.
   * @param {Array|Function|Object|string} [predicate=_.identity]
   *  The function invoked per iteration.
   * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
   * @returns {boolean} Returns `true` if any element passes the predicate check,
   *  else `false`.
   * @example
   *
   * _.some([null, 0, 'yes', false], Boolean);
   * // => true
   *
   * var users = [
   *   { 'user': 'barney', 'active': true },
   *   { 'user': 'fred',   'active': false }
   * ];
   *
   * // The `_.matches` iteratee shorthand.
   * _.some(users, { 'user': 'barney', 'active': false });
   * // => false
   *
   * // The `_.matchesProperty` iteratee shorthand.
   * _.some(users, ['active', false]);
   * // => true
   *
   * // The `_.property` iteratee shorthand.
   * _.some(users, 'active');
   * // => true
   */
  function some(collection, predicate, guard) {
    var func = isArray(collection) ? arraySome : baseSome;
    if (guard && isIterateeCall(collection, predicate, guard)) {
      predicate = undefined;
    }
    return func(collection, getIteratee(predicate, 3));
  }

  /**
   * Creates an array of elements, sorted in ascending order by the results of
   * running each element in a collection thru each iteratee. This method
   * performs a stable sort, that is, it preserves the original sort order of
   * equal elements. The iteratees are invoked with one argument: (value).
   *
   * @static
   * @memberOf _
   * @since 0.1.0
   * @category Collection
   * @param {Array|Object} collection The collection to iterate over.
   * @param {...(Array|Array[]|Function|Function[]|Object|Object[]|string|string[])}
   *  [iteratees=[_.identity]] The iteratees to sort by.
   * @returns {Array} Returns the new sorted array.
   * @example
   *
   * var users = [
   *   { 'user': 'fred',   'age': 48 },
   *   { 'user': 'barney', 'age': 36 },
   *   { 'user': 'fred',   'age': 40 },
   *   { 'user': 'barney', 'age': 34 }
   * ];
   *
   * _.sortBy(users, function(o) { return o.user; });
   * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
   *
   * _.sortBy(users, ['user', 'age']);
   * // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]]
   *
   * _.sortBy(users, 'user', function(o) {
   *   return Math.floor(o.age / 10);
   * });
   * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
   */
  var sortBy = rest(function(collection, iteratees) {
    if (collection == null) {
      return [];
    }
    var length = iteratees.length;
    if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {
      iteratees = [];
    } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {
      iteratees = [iteratees[0]];
    }
    iteratees = (iteratees.length == 1 && isArray(iteratees[0]))
      ? iteratees[0]
      : baseFlatten(iteratees, 1, isFlattenableIteratee);

    return baseOrderBy(collection, iteratees, []);
  });

  /*------------------------------------------------------------------------*/

  /**
   * Gets the timestamp of the number of milliseconds that have elapsed since
   * the Unix epoch (1 January 1970 00:00:00 UTC).
   *
   * @static
   * @memberOf _
   * @since 2.4.0
   * @category Date
   * @returns {number} Returns the timestamp.
   * @example
   *
   * _.defer(function(stamp) {
   *   console.log(_.now() - stamp);
   * }, _.now());
   * // => Logs the number of milliseconds it took for the deferred invocation.
   */
  function now() {
    return Date.now();
  }

  /*------------------------------------------------------------------------*/

  /**
   * The opposite of `_.before`; this method creates a function that invokes
   * `func` once it's called `n` or more times.
   *
   * @static
   * @memberOf _
   * @since 0.1.0
   * @category Function
   * @param {number} n The number of calls before `func` is invoked.
   * @param {Function} func The function to restrict.
   * @returns {Function} Returns the new restricted function.
   * @example
   *
   * var saves = ['profile', 'settings'];
   *
   * var done = _.after(saves.length, function() {
   *   console.log('done saving!');
   * });
   *
   * _.forEach(saves, function(type) {
   *   asyncSave({ 'type': type, 'complete': done });
   * });
   * // => Logs 'done saving!' after the two async saves have completed.
   */
  function after(n, func) {
    if (typeof func != 'function') {
      throw new TypeError(FUNC_ERROR_TEXT);
    }
    n = toInteger(n);
    return function() {
      if (--n < 1) {
        return func.apply(this, arguments);
      }
    };
  }

  /**
   * Creates a function that invokes `func`, with up to `n` arguments,
   * ignoring any additional arguments.
   *
   * @static
   * @memberOf _
   * @since 3.0.0
   * @category Function
   * @param {Function} func The function to cap arguments for.
   * @param {number} [n=func.length] The arity cap.
   * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
   * @returns {Function} Returns the new capped function.
   * @example
   *
   * _.map(['6', '8', '10'], _.ary(parseInt, 1));
   * // => [6, 8, 10]
   */
  function ary(func, n, guard) {
    n = guard ? undefined : n;
    n = (func && n == null) ? func.length : n;
    return createWrapper(func, ARY_FLAG, undefined, undefined, undefined, undefined, n);
  }

  /**
   * Creates a function that invokes `func`, with the `this` binding and arguments
   * of the created function, while it's called less than `n` times. Subsequent
   * calls to the created function return the result of the last `func` invocation.
   *
   * @static
   * @memberOf _
   * @since 3.0.0
   * @category Function
   * @param {number} n The number of calls at which `func` is no longer invoked.
   * @param {Function} func The function to restrict.
   * @returns {Function} Returns the new restricted function.
   * @example
   *
   * jQuery(element).on('click', _.before(5, addContactToList));
   * // => allows adding up to 4 contacts to the list
   */
  function before(n, func) {
    var result;
    if (typeof func != 'function') {
      throw new TypeError(FUNC_ERROR_TEXT);
    }
    n = toInteger(n);
    return function() {
      if (--n > 0) {
        result = func.apply(this, arguments);
      }
      if (n <= 1) {
        func = undefined;
      }
      return result;
    };
  }

  /**
   * Creates a function that invokes `func` with the `this` binding of `thisArg`
   * and `partials` prepended to the arguments it receives.
   *
   * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,
   * may be used as a placeholder for partially applied arguments.
   *
   * **Note:** Unlike native `Function#bind`, this method doesn't set the "length"
   * property of bound functions.
   *
   * @static
   * @memberOf _
   * @since 0.1.0
   * @category Function
   * @param {Function} func The function to bind.
   * @param {*} thisArg The `this` binding of `func`.
   * @param {...*} [partials] The arguments to be partially applied.
   * @returns {Function} Returns the new bound function.
   * @example
   *
   * var greet = function(greeting, punctuation) {
   *   return greeting + ' ' + this.user + punctuation;
   * };
   *
   * var object = { 'user': 'fred' };
   *
   * var bound = _.bind(greet, object, 'hi');
   * bound('!');
   * // => 'hi fred!'
   *
   * // Bound with placeholders.
   * var bound = _.bind(greet, object, _, '!');
   * bound('hi');
   * // => 'hi fred!'
   */
  var bind = rest(function(func, thisArg, partials) {
    var bitmask = BIND_FLAG;
    if (partials.length) {
      var holders = replaceHolders(partials, getHolder(bind));
      bitmask |= PARTIAL_FLAG;
    }
    return createWrapper(func, bitmask, thisArg, partials, holders);
  });

  /**
   * Creates a function that invokes the method at `object[key]` with `partials`
   * prepended to the arguments it receives.
   *
   * This method differs from `_.bind` by allowing bound functions to reference
   * methods that may be redefined or don't yet exist. See
   * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)
   * for more details.
   *
   * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic
   * builds, may be used as a placeholder for partially applied arguments.
   *
   * @static
   * @memberOf _
   * @since 0.10.0
   * @category Function
   * @param {Object} object The object to invoke the method on.
   * @param {string} key The key of the method.
   * @param {...*} [partials] The arguments to be partially applied.
   * @returns {Function} Returns the new bound function.
   * @example
   *
   * var object = {
   *   'user': 'fred',
   *   'greet': function(greeting, punctuation) {
   *     return greeting + ' ' + this.user + punctuation;
   *   }
   * };
   *
   * var bound = _.bindKey(object, 'greet', 'hi');
   * bound('!');
   * // => 'hi fred!'
   *
   * object.greet = function(greeting, punctuation) {
   *   return greeting + 'ya ' + this.user + punctuation;
   * };
   *
   * bound('!');
   * // => 'hiya fred!'
   *
   * // Bound with placeholders.
   * var bound = _.bindKey(object, 'greet', _, '!');
   * bound('hi');
   * // => 'hiya fred!'
   */
  var bindKey = rest(function(object, key, partials) {
    var bitmask = BIND_FLAG | BIND_KEY_FLAG;
    if (partials.length) {
      var holders = replaceHolders(partials, getHolder(bindKey));
      bitmask |= PARTIAL_FLAG;
    }
    return createWrapper(key, bitmask, object, partials, holders);
  });

  /**
   * Creates a function that accepts arguments of `func` and either invokes
   * `func` returning its result, if at least `arity` number of arguments have
   * been provided, or returns a function that accepts the remaining `func`
   * arguments, and so on. The arity of `func` may be specified if `func.length`
   * is not sufficient.
   *
   * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,
   * may be used as a placeholder for provided arguments.
   *
   * **Note:** This method doesn't set the "length" property of curried functions.
   *
   * @static
   * @memberOf _
   * @since 2.0.0
   * @category Function
   * @param {Function} func The function to curry.
   * @param {number} [arity=func.length] The arity of `func`.
   * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
   * @returns {Function} Returns the new curried function.
   * @example
   *
   * var abc = function(a, b, c) {
   *   return [a, b, c];
   * };
   *
   * var curried = _.curry(abc);
   *
   * curried(1)(2)(3);
   * // => [1, 2, 3]
   *
   * curried(1, 2)(3);
   * // => [1, 2, 3]
   *
   * curried(1, 2, 3);
   * // => [1, 2, 3]
   *
   * // Curried with placeholders.
   * curried(1)(_, 3)(2);
   * // => [1, 2, 3]
   */
  function curry(func, arity, guard) {
    arity = guard ? undefined : arity;
    var result = createWrapper(func, CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
    result.placeholder = curry.placeholder;
    return result;
  }

  /**
   * This method is like `_.curry` except that arguments are applied to `func`
   * in the manner of `_.partialRight` instead of `_.partial`.
   *
   * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic
   * builds, may be used as a placeholder for provided arguments.
   *
   * **Note:** This method doesn't set the "length" property of curried functions.
   *
   * @static
   * @memberOf _
   * @since 3.0.0
   * @category Function
   * @param {Function} func The function to curry.
   * @param {number} [arity=func.length] The arity of `func`.
   * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
   * @returns {Function} Returns the new curried function.
   * @example
   *
   * var abc = function(a, b, c) {
   *   return [a, b, c];
   * };
   *
   * var curried = _.curryRight(abc);
   *
   * curried(3)(2)(1);
   * // => [1, 2, 3]
   *
   * curried(2, 3)(1);
   * // => [1, 2, 3]
   *
   * curried(1, 2, 3);
   * // => [1, 2, 3]
   *
   * // Curried with placeholders.
   * curried(3)(1, _)(2);
   * // => [1, 2, 3]
   */
  function curryRight(func, arity, guard) {
    arity = guard ? undefined : arity;
    var result = createWrapper(func, CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
    result.placeholder = curryRight.placeholder;
    return result;
  }

  /**
   * Creates a debounced function that delays invoking `func` until after `wait`
   * milliseconds have elapsed since the last time the debounced function was
   * invoked. The debounced function comes with a `cancel` method to cancel
   * delayed `func` invocations and a `flush` method to immediately invoke them.
   * Provide an options object to indicate whether `func` should be invoked on
   * the leading and/or trailing edge of the `wait` timeout. The `func` is invoked
   * with the last arguments provided to the debounced function. Subsequent calls
   * to the debounced function return the result of the last `func` invocation.
   *
   * **Note:** If `leading` and `trailing` options are `true`, `func` is invoked
   * on the trailing edge of the timeout only if the debounced function is
   * invoked more than once during the `wait` timeout.
   *
   * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
   * for details over the differences between `_.debounce` and `_.throttle`.
   *
   * @static
   * @memberOf _
   * @since 0.1.0
   * @category Function
   * @param {Function} func The function to debounce.
   * @param {number} [wait=0] The number of milliseconds to delay.
   * @param {Object} [options={}] The options object.
   * @param {boolean} [options.leading=false]
   *  Specify invoking on the leading edge of the timeout.
   * @param {number} [options.maxWait]
   *  The maximum time `func` is allowed to be delayed before it's invoked.
   * @param {boolean} [options.trailing=true]
   *  Specify invoking on the trailing edge of the timeout.
   * @returns {Function} Returns the new debounced function.
   * @example
   *
   * // Avoid costly calculations while the window size is in flux.
   * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
   *
   * // Invoke `sendMail` when clicked, debouncing subsequent calls.
   * jQuery(element).on('click', _.debounce(sendMail, 300, {
   *   'leading': true,
   *   'trailing': false
   * }));
   *
   * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
   * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
   * var source = new EventSource('/stream');
   * jQuery(source).on('message', debounced);
   *
   * // Cancel the trailing debounced invocation.
   * jQuery(window).on('popstate', debounced.cancel);
   */
  function debounce(func, wait, options) {
    var lastArgs,
        lastThis,
        maxWait,
        result,
        timerId,
        lastCallTime,
        lastInvokeTime = 0,
        leading = false,
        maxing = false,
        trailing = true;

    if (typeof func != 'function') {
      throw new TypeError(FUNC_ERROR_TEXT);
    }
    wait = toNumber(wait) || 0;
    if (isObject(options)) {
      leading = !!options.leading;
      maxing = 'maxWait' in options;
      maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
      trailing = 'trailing' in options ? !!options.trailing : trailing;
    }

    function invokeFunc(time) {
      var args = lastArgs,
          thisArg = lastThis;

      lastArgs = lastThis = undefined;
      lastInvokeTime = time;
      result = func.apply(thisArg, args);
      return result;
    }

    function leadingEdge(time) {
      // Reset any `maxWait` timer.
      lastInvokeTime = time;
      // Start the timer for the trailing edge.
      timerId = setTimeout(timerExpired, wait);
      // Invoke the leading edge.
      return leading ? invokeFunc(time) : result;
    }

    function remainingWait(time) {
      var timeSinceLastCall = time - lastCallTime,
          timeSinceLastInvoke = time - lastInvokeTime,
          result = wait - timeSinceLastCall;

      return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;
    }

    function shouldInvoke(time) {
      var timeSinceLastCall = time - lastCallTime,
          timeSinceLastInvoke = time - lastInvokeTime;

      // 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 === undefined || (timeSinceLastCall >= wait) ||
        (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
    }

    function timerExpired() {
      var time = now();
      if (shouldInvoke(time)) {
        return trailingEdge(time);
      }
      // Restart the timer.
      timerId = setTimeout(timerExpired, remainingWait(time));
    }

    function trailingEdge(time) {
      timerId = undefined;

      // Only invoke if we have `lastArgs` which means `func` has been
      // debounced at least once.
      if (trailing && lastArgs) {
        return invokeFunc(time);
      }
      lastArgs = lastThis = undefined;
      return result;
    }

    function cancel() {
      lastInvokeTime = 0;
      lastArgs = lastCallTime = lastThis = timerId = undefined;
    }

    function flush() {
      return timerId === undefined ? result : trailingEdge(now());
    }

    function debounced() {
      var time = now(),
          isInvoking = shouldInvoke(time);

      lastArgs = arguments;
      lastThis = this;
      lastCallTime = time;

      if (isInvoking) {
        if (timerId === undefined) {
          return leadingEdge(lastCallTime);
        }
        if (maxing) {
          // Handle invocations in a tight loop.
          timerId = setTimeout(timerExpired, wait);
          return invokeFunc(lastCallTime);
        }
      }
      if (timerId === undefined) {
        timerId = setTimeout(timerExpired, wait);
      }
      return result;
    }
    debounced.cancel = cancel;
    debounced.flush = flush;
    return debounced;
  }

  /**
   * Defers invoking the `func` until the current call stack has cleared. Any
   * additional arguments are provided to `func` when it's invoked.
   *
   * @static
   * @memberOf _
   * @since 0.1.0
   * @category Function
   * @param {Function} func The function to defer.
   * @param {...*} [args] The arguments to invoke `func` with.
   * @returns {number} Returns the timer id.
   * @example
   *
   * _.defer(function(text) {
   *   console.log(text);
   * }, 'deferred');
   * // => Logs 'deferred' after one or more milliseconds.
   */
  var defer = rest(function(func, args) {
    return baseDelay(func, 1, args);
  });

  /**
   * Invokes `func` after `wait` milliseconds. Any additional arguments are
   * provided to `func` when it's invoked.
   *
   * @static
   * @memberOf _
   * @since 0.1.0
   * @category Function
   * @param {Function} func The function to delay.
   * @param {number} wait The number of milliseconds to delay invocation.
   * @param {...*} [args] The arguments to invoke `func` with.
   * @returns {number} Returns the timer id.
   * @example
   *
   * _.delay(function(text) {
   *   console.log(text);
   * }, 1000, 'later');
   * // => Logs 'later' after one second.
   */
  var delay = rest(function(func, wait, args) {
    return baseDelay(func, toNumber(wait) || 0, args);
  });

  /**
   * Creates a function that invokes `func` with arguments reversed.
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category Function
   * @param {Function} func The function to flip arguments for.
   * @returns {Function} Returns the new flipped function.
   * @example
   *
   * var flipped = _.flip(function() {
   *   return _.toArray(arguments);
   * });
   *
   * flipped('a', 'b', 'c', 'd');
   * // => ['d', 'c', 'b', 'a']
   */
  function flip(func) {
    return createWrapper(func, FLIP_FLAG);
  }

  /**
   * Creates a function that memoizes the result of `func`. If `resolver` is
   * provided, it determines the cache key for storing the result based on the
   * arguments provided to the memoized function. By default, the first argument
   * provided to the memoized function is used as the map cache key. The `func`
   * is invoked with the `this` binding of the memoized function.
   *
   * **Note:** The cache is exposed as the `cache` property on the memoized
   * function. Its creation may be customized by replacing the `_.memoize.Cache`
   * constructor with one whose instances implement the
   * [`Map`](http://ecma-international.org/ecma-262/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;

      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;
  }

  // Assign cache to `_.memoize`.
  memoize.Cache = MapCache;

  /**
   * Creates a function that negates the result of the predicate `func`. The
   * `func` predicate is invoked with the `this` binding and arguments of the
   * created function.
   *
   * @static
   * @memberOf _
   * @since 3.0.0
   * @category Function
   * @param {Function} predicate The predicate to negate.
   * @returns {Function} Returns the new negated function.
   * @example
   *
   * function isEven(n) {
   *   return n % 2 == 0;
   * }
   *
   * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));
   * // => [1, 3, 5]
   */
  function negate(predicate) {
    if (typeof predicate != 'function') {
      throw new TypeError(FUNC_ERROR_TEXT);
    }
    return function() {
      return !predicate.apply(this, arguments);
    };
  }

  /**
   * Creates a function that is restricted to invoking `func` once. Repeat calls
   * to the function return the value of the first invocation. The `func` is
   * invoked with the `this` binding and arguments of the created function.
   *
   * @static
   * @memberOf _
   * @since 0.1.0
   * @category Function
   * @param {Function} func The function to restrict.
   * @returns {Function} Returns the new restricted function.
   * @example
   *
   * var initialize = _.once(createApplication);
   * initialize();
   * initialize();
   * // `initialize` invokes `createApplication` once
   */
  function once(func) {
    return before(2, func);
  }

  /**
   * Creates a function that invokes `func` with arguments transformed by
   * corresponding `transforms`.
   *
   * @static
   * @since 4.0.0
   * @memberOf _
   * @category Function
   * @param {Function} func The function to wrap.
   * @param {...(Array|Array[]|Function|Function[]|Object|Object[]|string|string[])}
   *  [transforms[_.identity]] The functions to transform.
   * @returns {Function} Returns the new function.
   * @example
   *
   * function doubled(n) {
   *   return n * 2;
   * }
   *
   * function square(n) {
   *   return n * n;
   * }
   *
   * var func = _.overArgs(function(x, y) {
   *   return [x, y];
   * }, [square, doubled]);
   *
   * func(9, 3);
   * // => [81, 6]
   *
   * func(10, 5);
   * // => [100, 10]
   */
  var overArgs = rest(function(func, transforms) {
    transforms = (transforms.length == 1 && isArray(transforms[0]))
      ? arrayMap(transforms[0], baseUnary(getIteratee()))
      : arrayMap(baseFlatten(transforms, 1, isFlattenableIteratee), baseUnary(getIteratee()));

    var funcsLength = transforms.length;
    return rest(function(args) {
      var index = -1,
          length = nativeMin(args.length, funcsLength);

      while (++index < length) {
        args[index] = transforms[index].call(this, args[index]);
      }
      return apply(func, this, args);
    });
  });

  /**
   * Creates a function that invokes `func` with `partials` prepended to the
   * arguments it receives. This method is like `_.bind` except it does **not**
   * alter the `this` binding.
   *
   * The `_.partial.placeholder` value, which defaults to `_` in monolithic
   * builds, may be used as a placeholder for partially applied arguments.
   *
   * **Note:** This method doesn't set the "length" property of partially
   * applied functions.
   *
   * @static
   * @memberOf _
   * @since 0.2.0
   * @category Function
   * @param {Function} func The function to partially apply arguments to.
   * @param {...*} [partials] The arguments to be partially applied.
   * @returns {Function} Returns the new partially applied function.
   * @example
   *
   * var greet = function(greeting, name) {
   *   return greeting + ' ' + name;
   * };
   *
   * var sayHelloTo = _.partial(greet, 'hello');
   * sayHelloTo('fred');
   * // => 'hello fred'
   *
   * // Partially applied with placeholders.
   * var greetFred = _.partial(greet, _, 'fred');
   * greetFred('hi');
   * // => 'hi fred'
   */
  var partial = rest(function(func, partials) {
    var holders = replaceHolders(partials, getHolder(partial));
    return createWrapper(func, PARTIAL_FLAG, undefined, partials, holders);
  });

  /**
   * This method is like `_.partial` except that partially applied arguments
   * are appended to the arguments it receives.
   *
   * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic
   * builds, may be used as a placeholder for partially applied arguments.
   *
   * **Note:** This method doesn't set the "length" property of partially
   * applied functions.
   *
   * @static
   * @memberOf _
   * @since 1.0.0
   * @category Function
   * @param {Function} func The function to partially apply arguments to.
   * @param {...*} [partials] The arguments to be partially applied.
   * @returns {Function} Returns the new partially applied function.
   * @example
   *
   * var greet = function(greeting, name) {
   *   return greeting + ' ' + name;
   * };
   *
   * var greetFred = _.partialRight(greet, 'fred');
   * greetFred('hi');
   * // => 'hi fred'
   *
   * // Partially applied with placeholders.
   * var sayHelloTo = _.partialRight(greet, 'hello', _);
   * sayHelloTo('fred');
   * // => 'hello fred'
   */
  var partialRight = rest(function(func, partials) {
    var holders = replaceHolders(partials, getHolder(partialRight));
    return createWrapper(func, PARTIAL_RIGHT_FLAG, undefined, partials, holders);
  });

  /**
   * Creates a function that invokes `func` with arguments arranged according
   * to the specified `indexes` where the argument value at the first index is
   * provided as the first argument, the argument value at the second index is
   * provided as the second argument, and so on.
   *
   * @static
   * @memberOf _
   * @since 3.0.0
   * @category Function
   * @param {Function} func The function to rearrange arguments for.
   * @param {...(number|number[])} indexes The arranged argument indexes.
   * @returns {Function} Returns the new function.
   * @example
   *
   * var rearged = _.rearg(function(a, b, c) {
   *   return [a, b, c];
   * }, [2, 0, 1]);
   *
   * rearged('b', 'c', 'a')
   * // => ['a', 'b', 'c']
   */
  var rearg = rest(function(func, indexes) {
    return createWrapper(func, REARG_FLAG, undefined, undefined, undefined, baseFlatten(indexes, 1));
  });

  /**
   * Creates a function that invokes `func` with the `this` binding of the
   * created function and arguments from `start` and beyond provided as
   * an array.
   *
   * **Note:** This method is based on the
   * [rest parameter](https://mdn.io/rest_parameters).
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category Function
   * @param {Function} func The function to apply a rest parameter to.
   * @param {number} [start=func.length-1] The start position of the rest parameter.
   * @returns {Function} Returns the new function.
   * @example
   *
   * var say = _.rest(function(what, names) {
   *   return what + ' ' + _.initial(names).join(', ') +
   *     (_.size(names) > 1 ? ', & ' : '') + _.last(names);
   * });
   *
   * say('hello', 'fred', 'barney', 'pebbles');
   * // => 'hello fred, barney, & pebbles'
   */
  function rest(func, start) {
    if (typeof func != 'function') {
      throw new TypeError(FUNC_ERROR_TEXT);
    }
    start = nativeMax(start === undefined ? (func.length - 1) : toInteger(start), 0);
    return function() {
      var args = arguments,
          index = -1,
          length = nativeMax(args.length - start, 0),
          array = Array(length);

      while (++index < length) {
        array[index] = args[start + index];
      }
      switch (start) {
        case 0: return func.call(this, array);
        case 1: return func.call(this, args[0], array);
        case 2: return func.call(this, args[0], args[1], array);
      }
      var otherArgs = Array(start + 1);
      index = -1;
      while (++index < start) {
        otherArgs[index] = args[index];
      }
      otherArgs[start] = array;
      return apply(func, this, otherArgs);
    };
  }

  /**
   * Creates a function that invokes `func` with the `this` binding of the
   * create function and an array of arguments much like
   * [`Function#apply`](http://www.ecma-international.org/ecma-262/6.0/#sec-function.prototype.apply).
   *
   * **Note:** This method is based on the
   * [spread operator](https://mdn.io/spread_operator).
   *
   * @static
   * @memberOf _
   * @since 3.2.0
   * @category Function
   * @param {Function} func The function to spread arguments over.
   * @param {number} [start=0] The start position of the spread.
   * @returns {Function} Returns the new function.
   * @example
   *
   * var say = _.spread(function(who, what) {
   *   return who + ' says ' + what;
   * });
   *
   * say(['fred', 'hello']);
   * // => 'fred says hello'
   *
   * var numbers = Promise.all([
   *   Promise.resolve(40),
   *   Promise.resolve(36)
   * ]);
   *
   * numbers.then(_.spread(function(x, y) {
   *   return x + y;
   * }));
   * // => a Promise of 76
   */
  function spread(func, start) {
    if (typeof func != 'function') {
      throw new TypeError(FUNC_ERROR_TEXT);
    }
    start = start === undefined ? 0 : nativeMax(toInteger(start), 0);
    return rest(function(args) {
      var array = args[start],
          otherArgs = castSlice(args, 0, start);

      if (array) {
        arrayPush(otherArgs, array);
      }
      return apply(func, this, otherArgs);
    });
  }

  /**
   * Creates a throttled function that only invokes `func` at most once per
   * every `wait` milliseconds. The throttled function comes with a `cancel`
   * method to cancel delayed `func` invocations and a `flush` method to
   * immediately invoke them. Provide an options object to indicate whether
   * `func` should be invoked on the leading and/or trailing edge of the `wait`
   * timeout. The `func` is invoked with the last arguments provided to the
   * throttled function. Subsequent calls to the throttled function return the
   * result of the last `func` invocation.
   *
   * **Note:** If `leading` and `trailing` options are `true`, `func` is
   * invoked on the trailing edge of the timeout only if the throttled function
   * is invoked more than once during the `wait` timeout.
   *
   * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
   * for details over the differences between `_.throttle` and `_.debounce`.
   *
   * @static
   * @memberOf _
   * @since 0.1.0
   * @category Function
   * @param {Function} func The function to throttle.
   * @param {number} [wait=0] The number of milliseconds to throttle invocations to.
   * @param {Object} [options={}] The options object.
   * @param {boolean} [options.leading=true]
   *  Specify invoking on the leading edge of the timeout.
   * @param {boolean} [options.trailing=true]
   *  Specify invoking on the trailing edge of the timeout.
   * @returns {Function} Returns the new throttled function.
   * @example
   *
   * // Avoid excessively updating the position while scrolling.
   * jQuery(window).on('scroll', _.throttle(updatePosition, 100));
   *
   * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
   * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
   * jQuery(element).on('click', throttled);
   *
   * // Cancel the trailing throttled invocation.
   * jQuery(window).on('popstate', throttled.cancel);
   */
  function throttle(func, wait, options) {
    var leading = true,
        trailing = true;

    if (typeof func != 'function') {
      throw new TypeError(FUNC_ERROR_TEXT);
    }
    if (isObject(options)) {
      leading = 'leading' in options ? !!options.leading : leading;
      trailing = 'trailing' in options ? !!options.trailing : trailing;
    }
    return debounce(func, wait, {
      'leading': leading,
      'maxWait': wait,
      'trailing': trailing
    });
  }

  /**
   * Creates a function that accepts up to one argument, ignoring any
   * additional arguments.
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category Function
   * @param {Function} func The function to cap arguments for.
   * @returns {Function} Returns the new capped function.
   * @example
   *
   * _.map(['6', '8', '10'], _.unary(parseInt));
   * // => [6, 8, 10]
   */
  function unary(func) {
    return ary(func, 1);
  }

  /**
   * Creates a function that provides `value` to the wrapper function as its
   * first argument. Any additional arguments provided to the function are
   * appended to those provided to the wrapper function. The wrapper is invoked
   * with the `this` binding of the created function.
   *
   * @static
   * @memberOf _
   * @since 0.1.0
   * @category Function
   * @param {*} value The value to wrap.
   * @param {Function} [wrapper=identity] The wrapper function.
   * @returns {Function} Returns the new function.
   * @example
   *
   * var p = _.wrap(_.escape, function(func, text) {
   *   return '<p>' + func(text) + '</p>';
   * });
   *
   * p('fred, barney, & pebbles');
   * // => '<p>fred, barney, &amp; pebbles</p>'
   */
  function wrap(value, wrapper) {
    wrapper = wrapper == null ? identity : wrapper;
    return partial(wrapper, value);
  }

  /*------------------------------------------------------------------------*/

  /**
   * Casts `value` as an array if it's not one.
   *
   * @static
   * @memberOf _
   * @since 4.4.0
   * @category Lang
   * @param {*} value The value to inspect.
   * @returns {Array} Returns the cast array.
   * @example
   *
   * _.castArray(1);
   * // => [1]
   *
   * _.castArray({ 'a': 1 });
   * // => [{ 'a': 1 }]
   *
   * _.castArray('abc');
   * // => ['abc']
   *
   * _.castArray(null);
   * // => [null]
   *
   * _.castArray(undefined);
   * // => [undefined]
   *
   * _.castArray();
   * // => []
   *
   * var array = [1, 2, 3];
   * console.log(_.castArray(array) === array);
   * // => true
   */
  function castArray() {
    if (!arguments.length) {
      return [];
    }
    var value = arguments[0];
    return isArray(value) ? value : [value];
  }

  /**
   * 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);
  }

  /**
   * This method is like `_.clone` except that it accepts `customizer` which
   * is invoked to produce the cloned value. If `customizer` returns `undefined`,
   * cloning is handled by the method instead. The `customizer` is invoked with
   * up to four arguments; (value [, index|key, object, stack]).
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category Lang
   * @param {*} value The value to clone.
   * @param {Function} [customizer] The function to customize cloning.
   * @returns {*} Returns the cloned value.
   * @see _.cloneDeepWith
   * @example
   *
   * function customizer(value) {
   *   if (_.isElement(value)) {
   *     return value.cloneNode(false);
   *   }
   * }
   *
   * var el = _.cloneWith(document.body, customizer);
   *
   * console.log(el === document.body);
   * // => false
   * console.log(el.nodeName);
   * // => 'BODY'
   * console.log(el.childNodes.length);
   * // => 0
   */
  function cloneWith(value, customizer) {
    return baseClone(value, false, true, customizer);
  }

  /**
   * 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);
  }

  /**
   * This method is like `_.cloneWith` except that it recursively clones `value`.
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category Lang
   * @param {*} value The value to recursively clone.
   * @param {Function} [customizer] The function to customize cloning.
   * @returns {*} Returns the deep cloned value.
   * @see _.cloneWith
   * @example
   *
   * function customizer(value) {
   *   if (_.isElement(value)) {
   *     return value.cloneNode(true);
   *   }
   * }
   *
   * var el = _.cloneDeepWith(document.body, customizer);
   *
   * console.log(el === document.body);
   * // => false
   * console.log(el.nodeName);
   * // => 'BODY'
   * console.log(el.childNodes.length);
   * // => 20
   */
  function cloneDeepWith(value, customizer) {
    return baseClone(value, true, true, customizer);
  }

  /**
   * Performs a
   * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
   * comparison between two values to determine if they are equivalent.
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category Lang
   * @param {*} value The value to compare.
   * @param {*} other The other value to compare.
   * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
   * @example
   *
   * var object = { 'user': 'fred' };
   * var other = { 'user': 'fred' };
   *
   * _.eq(object, object);
   * // => true
   *
   * _.eq(object, other);
   * // => false
   *
   * _.eq('a', 'a');
   * // => true
   *
   * _.eq('a', Object('a'));
   * // => false
   *
   * _.eq(NaN, NaN);
   * // => true
   */
  function eq(value, other) {
    return value === other || (value !== value && other !== other);
  }

  /**
   * Checks if `value` is greater than `other`.
   *
   * @static
   * @memberOf _
   * @since 3.9.0
   * @category Lang
   * @param {*} value The value to compare.
   * @param {*} other The other value to compare.
   * @returns {boolean} Returns `true` if `value` is greater than `other`,
   *  else `false`.
   * @see _.lt
   * @example
   *
   * _.gt(3, 1);
   * // => true
   *
   * _.gt(3, 3);
   * // => false
   *
   * _.gt(1, 3);
   * // => false
   */
  var gt = createRelationalOperation(baseGt);

  /**
   * Checks if `value` is greater than or equal to `other`.
   *
   * @static
   * @memberOf _
   * @since 3.9.0
   * @category Lang
   * @param {*} value The value to compare.
   * @param {*} other The other value to compare.
   * @returns {boolean} Returns `true` if `value` is greater than or equal to
   *  `other`, else `false`.
   * @see _.lte
   * @example
   *
   * _.gte(3, 1);
   * // => true
   *
   * _.gte(3, 3);
   * // => true
   *
   * _.gte(1, 3);
   * // => false
   */
  var gte = createRelationalOperation(function(value, other) {
    return value >= other;
  });

  /**
   * 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);
  }

  /**
   * Checks if `value` is classified as an `Array` object.
   *
   * @static
   * @memberOf _
   * @since 0.1.0
   * @type {Function}
   * @category Lang
   * @param {*} value The value to check.
   * @returns {boolean} Returns `true` if `value` is correctly classified,
   *  else `false`.
   * @example
   *
   * _.isArray([1, 2, 3]);
   * // => true
   *
   * _.isArray(document.body.children);
   * // => false
   *
   * _.isArray('abc');
   * // => false
   *
   * _.isArray(_.noop);
   * // => false
   */
  var isArray = Array.isArray;

  /**
   * Checks if `value` is classified as an `ArrayBuffer` object.
   *
   * @static
   * @memberOf _
   * @since 4.3.0
   * @category Lang
   * @param {*} value The value to check.
   * @returns {boolean} Returns `true` if `value` is correctly classified,
   *  else `false`.
   * @example
   *
   * _.isArrayBuffer(new ArrayBuffer(2));
   * // => true
   *
   * _.isArrayBuffer(new Array(2));
   * // => false
   */
  function isArrayBuffer(value) {
    return isObjectLike(value) && objectToString.call(value) == arrayBufferTag;
  }

  /**
   * Checks if `value` is array-like. A value is considered array-like if it's
   * not a function and has a `value.length` that's an integer greater than or
   * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category Lang
   * @param {*} value The value to check.
   * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
   * @example
   *
   * _.isArrayLike([1, 2, 3]);
   * // => true
   *
   * _.isArrayLike(document.body.children);
   * // => true
   *
   * _.isArrayLike('abc');
   * // => true
   *
   * _.isArrayLike(_.noop);
   * // => false
   */
  function isArrayLike(value) {
    return value != null && isLength(getLength(value)) && !isFunction(value);
  }

  /**
   * This method is like `_.isArrayLike` except that it also checks if `value`
   * is an object.
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category Lang
   * @param {*} value The value to check.
   * @returns {boolean} Returns `true` if `value` is an array-like object,
   *  else `false`.
   * @example
   *
   * _.isArrayLikeObject([1, 2, 3]);
   * // => true
   *
   * _.isArrayLikeObject(document.body.children);
   * // => true
   *
   * _.isArrayLikeObject('abc');
   * // => false
   *
   * _.isArrayLikeObject(_.noop);
   * // => false
   */
  function isArrayLikeObject(value) {
    return isObjectLike(value) && isArrayLike(value);
  }

  /**
   * Checks if `value` is classified as a boolean primitive or 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
   *
   * _.isBoolean(false);
   * // => true
   *
   * _.isBoolean(null);
   * // => false
   */
  function isBoolean(value) {
    return value === true || value === false ||
      (isObjectLike(value) && objectToString.call(value) == boolTag);
  }

  /**
   * Checks if `value` is a buffer.
   *
   * @static
   * @memberOf _
   * @since 4.3.0
   * @category Lang
   * @param {*} value The value to check.
   * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
   * @example
   *
   * _.isBuffer(new Buffer(2));
   * // => true
   *
   * _.isBuffer(new Uint8Array(2));
   * // => false
   */
  var isBuffer = !Buffer ? stubFalse : function(value) {
    return value instanceof Buffer;
  };

  /**
   * Checks if `value` is classified as a `Date` 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
   *
   * _.isDate(new Date);
   * // => true
   *
   * _.isDate('Mon April 23 2012');
   * // => false
   */
  function isDate(value) {
    return isObjectLike(value) && objectToString.call(value) == dateTag;
  }

  /**
   * Checks if `value` is likely a DOM element.
   *
   * @static
   * @memberOf _
   * @since 0.1.0
   * @category Lang
   * @param {*} value The value to check.
   * @returns {boolean} Returns `true` if `value` is a DOM element,
   *  else `false`.
   * @example
   *
   * _.isElement(document.body);
   * // => true
   *
   * _.isElement('<body>');
   * // => false
   */
  function isElement(value) {
    return !!value && value.nodeType === 1 && isObjectLike(value) && !isPlainObject(value);
  }

  /**
   * Checks if `value` is an empty object, collection, map, or set.
   *
   * Objects are considered empty if they have no own enumerable string keyed
   * properties.
   *
   * Array-like values such as `arguments` objects, arrays, buffers, strings, or
   * jQuery-like collections are considered empty if they have a `length` of `0`.
   * Similarly, maps and sets are considered empty if they have a `size` of `0`.
   *
   * @static
   * @memberOf _
   * @since 0.1.0
   * @category Lang
   * @param {*} value The value to check.
   * @returns {boolean} Returns `true` if `value` is empty, else `false`.
   * @example
   *
   * _.isEmpty(null);
   * // => true
   *
   * _.isEmpty(true);
   * // => true
   *
   * _.isEmpty(1);
   * // => true
   *
   * _.isEmpty([1, 2, 3]);
   * // => false
   *
   * _.isEmpty({ 'a': 1 });
   * // => false
   */
  function isEmpty(value) {
    if (isArrayLike(value) &&
        (isArray(value) || isString(value) || isFunction(value.splice) ||
          isArguments(value) || isBuffer(value))) {
      return !value.length;
    }
    if (isObjectLike(value)) {
      var tag = getTag(value);
      if (tag == mapTag || tag == setTag) {
        return !value.size;
      }
    }
    for (var key in value) {
      if (hasOwnProperty.call(value, key)) {
        return false;
      }
    }
    return !(nonEnumShadows && keys(value).length);
  }

  /**
   * Performs a deep comparison between two values to determine if they are
   * equivalent.
   *
   * **Note:** This method supports comparing arrays, array buffers, booleans,
   * date objects, error objects, maps, numbers, `Object` objects, regexes,
   * sets, strings, symbols, and typed arrays. `Object` objects are compared
   * by their own, not inherited, enumerable properties. Functions and DOM
   * nodes are **not** supported.
   *
   * @static
   * @memberOf _
   * @since 0.1.0
   * @category Lang
   * @param {*} value The value to compare.
   * @param {*} other The other value to compare.
   * @returns {boolean} Returns `true` if the values are equivalent,
   *  else `false`.
   * @example
   *
   * var object = { 'user': 'fred' };
   * var other = { 'user': 'fred' };
   *
   * _.isEqual(object, other);
   * // => true
   *
   * object === other;
   * // => false
   */
  function isEqual(value, other) {
    return baseIsEqual(value, other);
  }

  /**
   * This method is like `_.isEqual` except that it accepts `customizer` which
   * is invoked to compare values. If `customizer` returns `undefined`, comparisons
   * are handled by the method instead. The `customizer` is invoked with up to
   * six arguments: (objValue, othValue [, index|key, object, other, stack]).
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category Lang
   * @param {*} value The value to compare.
   * @param {*} other The other value to compare.
   * @param {Function} [customizer] The function to customize comparisons.
   * @returns {boolean} Returns `true` if the values are equivalent,
   *  else `false`.
   * @example
   *
   * function isGreeting(value) {
   *   return /^h(?:i|ello)$/.test(value);
   * }
   *
   * function customizer(objValue, othValue) {
   *   if (isGreeting(objValue) && isGreeting(othValue)) {
   *     return true;
   *   }
   * }
   *
   * var array = ['hello', 'goodbye'];
   * var other = ['hi', 'goodbye'];
   *
   * _.isEqualWith(array, other, customizer);
   * // => true
   */
  function isEqualWith(value, other, customizer) {
    customizer = typeof customizer == 'function' ? customizer : undefined;
    var result = customizer ? customizer(value, other) : undefined;
    return result === undefined ? baseIsEqual(value, other, customizer) : !!result;
  }

  /**
   * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,
   * `SyntaxError`, `TypeError`, or `URIError` object.
   *
   * @static
   * @memberOf _
   * @since 3.0.0
   * @category Lang
   * @param {*} value The value to check.
   * @returns {boolean} Returns `true` if `value` is an error object,
   *  else `false`.
   * @example
   *
   * _.isError(new Error);
   * // => true
   *
   * _.isError(Error);
   * // => false
   */
  function isError(value) {
    if (!isObjectLike(value)) {
      return false;
    }
    return (objectToString.call(value) == errorTag) ||
      (typeof value.message == 'string' && typeof value.name == 'string');
  }

  /**
   * Checks if `value` is a finite primitive number.
   *
   * **Note:** This method is based on
   * [`Number.isFinite`](https://mdn.io/Number/isFinite).
   *
   * @static
   * @memberOf _
   * @since 0.1.0
   * @category Lang
   * @param {*} value The value to check.
   * @returns {boolean} Returns `true` if `value` is a finite number,
   *  else `false`.
   * @example
   *
   * _.isFinite(3);
   * // => true
   *
   * _.isFinite(Number.MIN_VALUE);
   * // => true
   *
   * _.isFinite(Infinity);
   * // => false
   *
   * _.isFinite('3');
   * // => false
   */
  function isFinite(value) {
    return typeof value == 'number' && nativeIsFinite(value);
  }

  /**
   * Checks if `value` is classified as a `Function` object.
   *
   * @static
   * @memberOf _
   * @since 0.1.0
   * @category Lang
   * @param {*} value The value to check.
   * @returns {boolean} Returns `true` if `value` is correctly classified,
   *  else `false`.
   * @example
   *
   * _.isFunction(_);
   * // => true
   *
   * _.isFunction(/abc/);
   * // => false
   */
  function isFunction(value) {
    // The use of `Object#toString` avoids issues with the `typeof` operator
    // in Safari 8 which returns 'object' for typed array and weak map constructors,
    // and PhantomJS 1.9 which returns 'function' for `NodeList` instances.
    var tag = isObject(value) ? objectToString.call(value) : '';
    return tag == funcTag || tag == genTag;
  }

  /**
   * Checks if `value` is an integer.
   *
   * **Note:** This method is based on
   * [`Number.isInteger`](https://mdn.io/Number/isInteger).
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category Lang
   * @param {*} value The value to check.
   * @returns {boolean} Returns `true` if `value` is an integer, else `false`.
   * @example
   *
   * _.isInteger(3);
   * // => true
   *
   * _.isInteger(Number.MIN_VALUE);
   * // => false
   *
   * _.isInteger(Infinity);
   * // => false
   *
   * _.isInteger('3');
   * // => false
   */
  function isInteger(value) {
    return typeof value == 'number' && value == toInteger(value);
  }

  /**
   * Checks if `value` is a valid array-like length.
   *
   * **Note:** This function is loosely based on
   * [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category Lang
   * @param {*} value The value to check.
   * @returns {boolean} Returns `true` if `value` is a valid length,
   *  else `false`.
   * @example
   *
   * _.isLength(3);
   * // => true
   *
   * _.isLength(Number.MIN_VALUE);
   * // => false
   *
   * _.isLength(Infinity);
   * // => false
   *
   * _.isLength('3');
   * // => false
   */
  function isLength(value) {
    return typeof value == 'number' &&
      value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
  }

  /**
   * Checks if `value` is the
   * [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types)
   * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
   *
   * @static
   * @memberOf _
   * @since 0.1.0
   * @category Lang
   * @param {*} value The value to check.
   * @returns {boolean} Returns `true` if `value` is an object, else `false`.
   * @example
   *
   * _.isObject({});
   * // => true
   *
   * _.isObject([1, 2, 3]);
   * // => true
   *
   * _.isObject(_.noop);
   * // => true
   *
   * _.isObject(null);
   * // => false
   */
  function isObject(value) {
    var type = typeof value;
    return !!value && (type == 'object' || type == 'function');
  }

  /**
   * Checks if `value` is object-like. A value is object-like if it's not `null`
   * and has a `typeof` result of "object".
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category Lang
   * @param {*} value The value to check.
   * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
   * @example
   *
   * _.isObjectLike({});
   * // => true
   *
   * _.isObjectLike([1, 2, 3]);
   * // => true
   *
   * _.isObjectLike(_.noop);
   * // => false
   *
   * _.isObjectLike(null);
   * // => false
   */
  function isObjectLike(value) {
    return !!value && typeof value == 'object';
  }

  /**
   * Checks if `value` is classified as a `Map` object.
   *
   * @static
   * @memberOf _
   * @since 4.3.0
   * @category Lang
   * @param {*} value The value to check.
   * @returns {boolean} Returns `true` if `value` is correctly classified,
   *  else `false`.
   * @example
   *
   * _.isMap(new Map);
   * // => true
   *
   * _.isMap(new WeakMap);
   * // => false
   */
  function isMap(value) {
    return isObjectLike(value) && getTag(value) == mapTag;
  }

  /**
   * Performs a partial deep comparison between `object` and `source` to
   * determine if `object` contains equivalent property values. This method is
   * equivalent to a `_.matches` function when `source` is partially applied.
   *
   * **Note:** This method supports comparing the same values as `_.isEqual`.
   *
   * @static
   * @memberOf _
   * @since 3.0.0
   * @category Lang
   * @param {Object} object The object to inspect.
   * @param {Object} source The object of property values to match.
   * @returns {boolean} Returns `true` if `object` is a match, else `false`.
   * @example
   *
   * var object = { 'user': 'fred', 'age': 40 };
   *
   * _.isMatch(object, { 'age': 40 });
   * // => true
   *
   * _.isMatch(object, { 'age': 36 });
   * // => false
   */
  function isMatch(object, source) {
    return object === source || baseIsMatch(object, source, getMatchData(source));
  }

  /**
   * This method is like `_.isMatch` except that it accepts `customizer` which
   * is invoked to compare values. If `customizer` returns `undefined`, comparisons
   * are handled by the method instead. The `customizer` is invoked with five
   * arguments: (objValue, srcValue, index|key, object, source).
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category Lang
   * @param {Object} object The object to inspect.
   * @param {Object} source The object of property values to match.
   * @param {Function} [customizer] The function to customize comparisons.
   * @returns {boolean} Returns `true` if `object` is a match, else `false`.
   * @example
   *
   * function isGreeting(value) {
   *   return /^h(?:i|ello)$/.test(value);
   * }
   *
   * function customizer(objValue, srcValue) {
   *   if (isGreeting(objValue) && isGreeting(srcValue)) {
   *     return true;
   *   }
   * }
   *
   * var object = { 'greeting': 'hello' };
   * var source = { 'greeting': 'hi' };
   *
   * _.isMatchWith(object, source, customizer);
   * // => true
   */
  function isMatchWith(object, source, customizer) {
    customizer = typeof customizer == 'function' ? customizer : undefined;
    return baseIsMatch(object, source, getMatchData(source), customizer);
  }

  /**
   * Checks if `value` is `NaN`.
   *
   * **Note:** This method is based on
   * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as
   * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for
   * `undefined` and other non-number values.
   *
   * @static
   * @memberOf _
   * @since 0.1.0
   * @category Lang
   * @param {*} value The value to check.
   * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
   * @example
   *
   * _.isNaN(NaN);
   * // => true
   *
   * _.isNaN(new Number(NaN));
   * // => true
   *
   * isNaN(undefined);
   * // => true
   *
   * _.isNaN(undefined);
   * // => false
   */
  function isNaN(value) {
    // An `NaN` primitive is the only value that is not equal to itself.
    // Perform the `toStringTag` check first to avoid errors with some
    // ActiveX objects in IE.
    return isNumber(value) && value != +value;
  }

  /**
   * Checks if `value` is a pristine native function.
   *
   * **Note:** This method can't reliably detect native functions in the
   * presence of the `core-js` package because `core-js` circumvents this kind
   * of detection. Despite multiple requests, the `core-js` maintainer has made
   * it clear: any attempt to fix the detection will be obstructed. As a result,
   * we're left with little choice but to throw an error. Unfortunately, this
   * also affects packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill),
   * which rely on `core-js`.
   *
   * @static
   * @memberOf _
   * @since 3.0.0
   * @category Lang
   * @param {*} value The value to check.
   * @returns {boolean} Returns `true` if `value` is a native function,
   *  else `false`.
   * @example
   *
   * _.isNative(Array.prototype.push);
   * // => true
   *
   * _.isNative(_);
   * // => false
   */
  function isNative(value) {
    if (isMaskable(value)) {
      throw new Error('This method is not supported with `core-js`. Try https://github.com/es-shims.');
    }
    return baseIsNative(value);
  }

  /**
   * Checks if `value` is `null`.
   *
   * @static
   * @memberOf _
   * @since 0.1.0
   * @category Lang
   * @param {*} value The value to check.
   * @returns {boolean} Returns `true` if `value` is `null`, else `false`.
   * @example
   *
   * _.isNull(null);
   * // => true
   *
   * _.isNull(void 0);
   * // => false
   */
  function isNull(value) {
    return value === null;
  }

  /**
   * Checks if `value` is `null` or `undefined`.
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category Lang
   * @param {*} value The value to check.
   * @returns {boolean} Returns `true` if `value` is nullish, else `false`.
   * @example
   *
   * _.isNil(null);
   * // => true
   *
   * _.isNil(void 0);
   * // => true
   *
   * _.isNil(NaN);
   * // => false
   */
  function isNil(value) {
    return value == null;
  }

  /**
   * 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);
  }

  /**
   * 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);
  }

  /**
   * 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;
  }

  /**
   * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754
   * double precision number which isn't the result of a rounded unsafe integer.
   *
   * **Note:** This method is based on
   * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger).
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category Lang
   * @param {*} value The value to check.
   * @returns {boolean} Returns `true` if `value` is a safe integer,
   *  else `false`.
   * @example
   *
   * _.isSafeInteger(3);
   * // => true
   *
   * _.isSafeInteger(Number.MIN_VALUE);
   * // => false
   *
   * _.isSafeInteger(Infinity);
   * // => false
   *
   * _.isSafeInteger('3');
   * // => false
   */
  function isSafeInteger(value) {
    return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;
  }

  /**
   * Checks if `value` is classified as a `Set` object.
   *
   * @static
   * @memberOf _
   * @since 4.3.0
   * @category Lang
   * @param {*} value The value to check.
   * @returns {boolean} Returns `true` if `value` is correctly classified,
   *  else `false`.
   * @example
   *
   * _.isSet(new Set);
   * // => true
   *
   * _.isSet(new WeakSet);
   * // => false
   */
  function isSet(value) {
    return isObjectLike(value) && getTag(value) == setTag;
  }

  /**
   * 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);
  }

  /**
   * Checks if `value` is classified as a `Symbol` primitive or object.
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category Lang
   * @param {*} value The value to check.
   * @returns {boolean} Returns `true` if `value` is correctly classified,
   *  else `false`.
   * @example
   *
   * _.isSymbol(Symbol.iterator);
   * // => true
   *
   * _.isSymbol('abc');
   * // => false
   */
  function isSymbol(value) {
    return typeof value == 'symbol' ||
      (isObjectLike(value) && objectToString.call(value) == symbolTag);
  }

  /**
   * 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 isTypedArray(value) {
    return isObjectLike(value) &&
      isLength(value.length) && !!typedArrayTags[objectToString.call(value)];
  }

  /**
   * Checks if `value` is `undefined`.
   *
   * @static
   * @since 0.1.0
   * @memberOf _
   * @category Lang
   * @param {*} value The value to check.
   * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.
   * @example
   *
   * _.isUndefined(void 0);
   * // => true
   *
   * _.isUndefined(null);
   * // => false
   */
  function isUndefined(value) {
    return value === undefined;
  }

  /**
   * Checks if `value` is classified as a `WeakMap` object.
   *
   * @static
   * @memberOf _
   * @since 4.3.0
   * @category Lang
   * @param {*} value The value to check.
   * @returns {boolean} Returns `true` if `value` is correctly classified,
   *  else `false`.
   * @example
   *
   * _.isWeakMap(new WeakMap);
   * // => true
   *
   * _.isWeakMap(new Map);
   * // => false
   */
  function isWeakMap(value) {
    return isObjectLike(value) && getTag(value) == weakMapTag;
  }

  /**
   * Checks if `value` is classified as a `WeakSet` object.
   *
   * @static
   * @memberOf _
   * @since 4.3.0
   * @category Lang
   * @param {*} value The value to check.
   * @returns {boolean} Returns `true` if `value` is correctly classified,
   *  else `false`.
   * @example
   *
   * _.isWeakSet(new WeakSet);
   * // => true
   *
   * _.isWeakSet(new Set);
   * // => false
   */
  function isWeakSet(value) {
    return isObjectLike(value) && objectToString.call(value) == weakSetTag;
  }

  /**
   * Checks if `value` is less than `other`.
   *
   * @static
   * @memberOf _
   * @since 3.9.0
   * @category Lang
   * @param {*} value The value to compare.
   * @param {*} other The other value to compare.
   * @returns {boolean} Returns `true` if `value` is less than `other`,
   *  else `false`.
   * @see _.gt
   * @example
   *
   * _.lt(1, 3);
   * // => true
   *
   * _.lt(3, 3);
   * // => false
   *
   * _.lt(3, 1);
   * // => false
   */
  var lt = createRelationalOperation(baseLt);

  /**
   * Checks if `value` is less than or equal to `other`.
   *
   * @static
   * @memberOf _
   * @since 3.9.0
   * @category Lang
   * @param {*} value The value to compare.
   * @param {*} other The other value to compare.
   * @returns {boolean} Returns `true` if `value` is less than or equal to
   *  `other`, else `false`.
   * @see _.gte
   * @example
   *
   * _.lte(1, 3);
   * // => true
   *
   * _.lte(3, 3);
   * // => true
   *
   * _.lte(3, 1);
   * // => false
   */
  var lte = createRelationalOperation(function(value, other) {
    return value <= other;
  });

  /**
   * Converts `value` to an array.
   *
   * @static
   * @since 0.1.0
   * @memberOf _
   * @category Lang
   * @param {*} value The value to convert.
   * @returns {Array} Returns the converted array.
   * @example
   *
   * _.toArray({ 'a': 1, 'b': 2 });
   * // => [1, 2]
   *
   * _.toArray('abc');
   * // => ['a', 'b', 'c']
   *
   * _.toArray(1);
   * // => []
   *
   * _.toArray(null);
   * // => []
   */
  function toArray(value) {
    if (!value) {
      return [];
    }
    if (isArrayLike(value)) {
      return isString(value) ? stringToArray(value) : copyArray(value);
    }
    if (iteratorSymbol && value[iteratorSymbol]) {
      return iteratorToArray(value[iteratorSymbol]());
    }
    var tag = getTag(value),
        func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values);

    return func(value);
  }

  /**
   * Converts `value` to a finite number.
   *
   * @static
   * @memberOf _
   * @since 4.12.0
   * @category Lang
   * @param {*} value The value to convert.
   * @returns {number} Returns the converted number.
   * @example
   *
   * _.toFinite(3.2);
   * // => 3.2
   *
   * _.toFinite(Number.MIN_VALUE);
   * // => 5e-324
   *
   * _.toFinite(Infinity);
   * // => 1.7976931348623157e+308
   *
   * _.toFinite('3.2');
   * // => 3.2
   */
  function toFinite(value) {
    if (!value) {
      return value === 0 ? value : 0;
    }
    value = toNumber(value);
    if (value === INFINITY || value === -INFINITY) {
      var sign = (value < 0 ? -1 : 1);
      return sign * MAX_INTEGER;
    }
    return value === value ? value : 0;
  }

  /**
   * Converts `value` to an integer.
   *
   * **Note:** This method is loosely based on
   * [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger).
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category Lang
   * @param {*} value The value to convert.
   * @returns {number} Returns the converted integer.
   * @example
   *
   * _.toInteger(3.2);
   * // => 3
   *
   * _.toInteger(Number.MIN_VALUE);
   * // => 0
   *
   * _.toInteger(Infinity);
   * // => 1.7976931348623157e+308
   *
   * _.toInteger('3.2');
   * // => 3
   */
  function toInteger(value) {
    var result = toFinite(value),
        remainder = result % 1;

    return result === result ? (remainder ? result - remainder : result) : 0;
  }

  /**
   * Converts `value` to an integer suitable for use as the length of an
   * array-like object.
   *
   * **Note:** This method is based on
   * [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category Lang
   * @param {*} value The value to convert.
   * @returns {number} Returns the converted integer.
   * @example
   *
   * _.toLength(3.2);
   * // => 3
   *
   * _.toLength(Number.MIN_VALUE);
   * // => 0
   *
   * _.toLength(Infinity);
   * // => 4294967295
   *
   * _.toLength('3.2');
   * // => 3
   */
  function toLength(value) {
    return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;
  }

  /**
   * Converts `value` to a number.
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category Lang
   * @param {*} value The value to process.
   * @returns {number} Returns the number.
   * @example
   *
   * _.toNumber(3.2);
   * // => 3.2
   *
   * _.toNumber(Number.MIN_VALUE);
   * // => 5e-324
   *
   * _.toNumber(Infinity);
   * // => Infinity
   *
   * _.toNumber('3.2');
   * // => 3.2
   */
  function toNumber(value) {
    if (typeof value == 'number') {
      return value;
    }
    if (isSymbol(value)) {
      return NAN;
    }
    if (isObject(value)) {
      var other = isFunction(value.valueOf) ? value.valueOf() : value;
      value = isObject(other) ? (other + '') : other;
    }
    if (typeof value != 'string') {
      return value === 0 ? value : +value;
    }
    value = value.replace(reTrim, '');
    var isBinary = reIsBinary.test(value);
    return (isBinary || reIsOctal.test(value))
      ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
      : (reIsBadHex.test(value) ? NAN : +value);
  }

  /**
   * Converts `value` to a plain object flattening inherited enumerable string
   * keyed properties of `value` to own properties of the plain object.
   *
   * @static
   * @memberOf _
   * @since 3.0.0
   * @category Lang
   * @param {*} value The value to convert.
   * @returns {Object} Returns the converted plain object.
   * @example
   *
   * function Foo() {
   *   this.b = 2;
   * }
   *
   * Foo.prototype.c = 3;
   *
   * _.assign({ 'a': 1 }, new Foo);
   * // => { 'a': 1, 'b': 2 }
   *
   * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));
   * // => { 'a': 1, 'b': 2, 'c': 3 }
   */
  function toPlainObject(value) {
    return copyObject(value, keysIn(value));
  }

  /**
   * Converts `value` to a safe integer. A safe integer can be compared and
   * represented correctly.
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category Lang
   * @param {*} value The value to convert.
   * @returns {number} Returns the converted integer.
   * @example
   *
   * _.toSafeInteger(3.2);
   * // => 3
   *
   * _.toSafeInteger(Number.MIN_VALUE);
   * // => 0
   *
   * _.toSafeInteger(Infinity);
   * // => 9007199254740991
   *
   * _.toSafeInteger('3.2');
   * // => 3
   */
  function toSafeInteger(value) {
    return baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER);
  }

  /**
   * 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);
  }

  /*------------------------------------------------------------------------*/

  /**
   * 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]);
      }
    }
  });

  /**
   * This method is like `_.assign` except that it iterates over own and
   * inherited source properties.
   *
   * **Note:** This method mutates `object`.
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @alias extend
   * @category Object
   * @param {Object} object The destination object.
   * @param {...Object} [sources] The source objects.
   * @returns {Object} Returns `object`.
   * @see _.assign
   * @example
   *
   * function Foo() {
   *   this.b = 2;
   * }
   *
   * function Bar() {
   *   this.d = 4;
   * }
   *
   * Foo.prototype.c = 3;
   * Bar.prototype.e = 5;
   *
   * _.assignIn({ 'a': 1 }, new Foo, new Bar);
   * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4, 'e': 5 }
   */
  var assignIn = createAssigner(function(object, source) {
    if (nonEnumShadows || isPrototype(source) || isArrayLike(source)) {
      copyObject(source, keysIn(source), object);
      return;
    }
    for (var key in source) {
      assignValue(object, key, source[key]);
    }
  });

  /**
   * 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);
  });

  /**
   * This method is like `_.assign` 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
   * @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 _.assignInWith
   * @example
   *
   * function customizer(objValue, srcValue) {
   *   return _.isUndefined(objValue) ? srcValue : objValue;
   * }
   *
   * var defaults = _.partialRight(_.assignWith, customizer);
   *
   * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
   * // => { 'a': 1, 'b': 2 }
   */
  var assignWith = createAssigner(function(object, source, srcIndex, customizer) {
    copyObject(source, keys(source), object, customizer);
  });

  /**
   * Creates an array of values corresponding to `paths` of `object`.
   *
   * @static
   * @memberOf _
   * @since 1.0.0
   * @category Object
   * @param {Object} object The object to iterate over.
   * @param {...(string|string[])} [paths] The property paths of elements to pick.
   * @returns {Array} Returns the picked values.
   * @example
   *
   * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
   *
   * _.at(object, ['a[0].b.c', 'a[1]']);
   * // => [3, 4]
   */
  var at = rest(function(object, paths) {
    return baseAt(object, baseFlatten(paths, 1));
  });

  /**
   * Creates an object that inherits from the `prototype` object. If a
   * `properties` object is given, its own enumerable string keyed properties
   * are assigned to the created object.
   *
   * @static
   * @memberOf _
   * @since 2.3.0
   * @category Object
   * @param {Object} prototype The object to inherit from.
   * @param {Object} [properties] The properties to assign to the object.
   * @returns {Object} Returns the new object.
   * @example
   *
   * function Shape() {
   *   this.x = 0;
   *   this.y = 0;
   * }
   *
   * function Circle() {
   *   Shape.call(this);
   * }
   *
   * Circle.prototype = _.create(Shape.prototype, {
   *   'constructor': Circle
   * });
   *
   * var circle = new Circle;
   * circle instanceof Circle;
   * // => true
   *
   * circle instanceof Shape;
   * // => true
   */
  function create(prototype, properties) {
    var result = baseCreate(prototype);
    return properties ? baseAssign(result, properties) : result;
  }

  /**
   * 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 method is like `_.defaults` except that it recursively assigns
   * default properties.
   *
   * **Note:** This method mutates `object`.
   *
   * @static
   * @memberOf _
   * @since 3.10.0
   * @category Object
   * @param {Object} object The destination object.
   * @param {...Object} [sources] The source objects.
   * @returns {Object} Returns `object`.
   * @see _.defaults
   * @example
   *
   * _.defaultsDeep({ 'user': { 'name': 'barney' } }, { 'user': { 'name': 'fred', 'age': 36 } });
   * // => { 'user': { 'name': 'barney', 'age': 36 } }
   *
   */
  var defaultsDeep = rest(function(args) {
    args.push(undefined, mergeDefaults);
    return apply(mergeWith, undefined, args);
  });

  /**
   * This method is like `_.find` except that it returns the key of the first
   * element `predicate` returns truthy for instead of the element itself.
   *
   * @static
   * @memberOf _
   * @since 1.1.0
   * @category Object
   * @param {Object} object The object to search.
   * @param {Array|Function|Object|string} [predicate=_.identity]
   *  The function invoked per iteration.
   * @returns {string|undefined} Returns the key of the matched element,
   *  else `undefined`.
   * @example
   *
   * var users = {
   *   'barney':  { 'age': 36, 'active': true },
   *   'fred':    { 'age': 40, 'active': false },
   *   'pebbles': { 'age': 1,  'active': true }
   * };
   *
   * _.findKey(users, function(o) { return o.age < 40; });
   * // => 'barney' (iteration order is not guaranteed)
   *
   * // The `_.matches` iteratee shorthand.
   * _.findKey(users, { 'age': 1, 'active': true });
   * // => 'pebbles'
   *
   * // The `_.matchesProperty` iteratee shorthand.
   * _.findKey(users, ['active', false]);
   * // => 'fred'
   *
   * // The `_.property` iteratee shorthand.
   * _.findKey(users, 'active');
   * // => 'barney'
   */
  function findKey(object, predicate) {
    return baseFindKey(object, getIteratee(predicate, 3), baseForOwn);
  }

  /**
   * This method is like `_.findKey` except that it iterates over elements of
   * a collection in the opposite order.
   *
   * @static
   * @memberOf _
   * @since 2.0.0
   * @category Object
   * @param {Object} object The object to search.
   * @param {Array|Function|Object|string} [predicate=_.identity]
   *  The function invoked per iteration.
   * @returns {string|undefined} Returns the key of the matched element,
   *  else `undefined`.
   * @example
   *
   * var users = {
   *   'barney':  { 'age': 36, 'active': true },
   *   'fred':    { 'age': 40, 'active': false },
   *   'pebbles': { 'age': 1,  'active': true }
   * };
   *
   * _.findLastKey(users, function(o) { return o.age < 40; });
   * // => returns 'pebbles' assuming `_.findKey` returns 'barney'
   *
   * // The `_.matches` iteratee shorthand.
   * _.findLastKey(users, { 'age': 36, 'active': true });
   * // => 'barney'
   *
   * // The `_.matchesProperty` iteratee shorthand.
   * _.findLastKey(users, ['active', false]);
   * // => 'fred'
   *
   * // The `_.property` iteratee shorthand.
   * _.findLastKey(users, 'active');
   * // => 'pebbles'
   */
  function findLastKey(object, predicate) {
    return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight);
  }

  /**
   * Iterates over own and inherited enumerable string keyed properties of an
   * object and invokes `iteratee` for each property. The iteratee is invoked
   * with three arguments: (value, key, object). Iteratee functions may exit
   * iteration early by explicitly returning `false`.
   *
   * @static
   * @memberOf _
   * @since 0.3.0
   * @category Object
   * @param {Object} object The object to iterate over.
   * @param {Function} [iteratee=_.identity] The function invoked per iteration.
   * @returns {Object} Returns `object`.
   * @see _.forInRight
   * @example
   *
   * function Foo() {
   *   this.a = 1;
   *   this.b = 2;
   * }
   *
   * Foo.prototype.c = 3;
   *
   * _.forIn(new Foo, function(value, key) {
   *   console.log(key);
   * });
   * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).
   */
  function forIn(object, iteratee) {
    return object == null
      ? object
      : baseFor(object, getIteratee(iteratee, 3), keysIn);
  }

  /**
   * This method is like `_.forIn` except that it iterates over properties of
   * `object` in the opposite order.
   *
   * @static
   * @memberOf _
   * @since 2.0.0
   * @category Object
   * @param {Object} object The object to iterate over.
   * @param {Function} [iteratee=_.identity] The function invoked per iteration.
   * @returns {Object} Returns `object`.
   * @see _.forIn
   * @example
   *
   * function Foo() {
   *   this.a = 1;
   *   this.b = 2;
   * }
   *
   * Foo.prototype.c = 3;
   *
   * _.forInRight(new Foo, function(value, key) {
   *   console.log(key);
   * });
   * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'.
   */
  function forInRight(object, iteratee) {
    return object == null
      ? object
      : baseForRight(object, getIteratee(iteratee, 3), keysIn);
  }

  /**
   * Iterates over own enumerable string keyed properties of an object and
   * invokes `iteratee` for each property. The iteratee is invoked with three
   * arguments: (value, key, object). Iteratee functions may exit iteration
   * early by explicitly returning `false`.
   *
   * @static
   * @memberOf _
   * @since 0.3.0
   * @category Object
   * @param {Object} object The object to iterate over.
   * @param {Function} [iteratee=_.identity] The function invoked per iteration.
   * @returns {Object} Returns `object`.
   * @see _.forOwnRight
   * @example
   *
   * function Foo() {
   *   this.a = 1;
   *   this.b = 2;
   * }
   *
   * Foo.prototype.c = 3;
   *
   * _.forOwn(new Foo, function(value, key) {
   *   console.log(key);
   * });
   * // => Logs 'a' then 'b' (iteration order is not guaranteed).
   */
  function forOwn(object, iteratee) {
    return object && baseForOwn(object, getIteratee(iteratee, 3));
  }

  /**
   * This method is like `_.forOwn` except that it iterates over properties of
   * `object` in the opposite order.
   *
   * @static
   * @memberOf _
   * @since 2.0.0
   * @category Object
   * @param {Object} object The object to iterate over.
   * @param {Function} [iteratee=_.identity] The function invoked per iteration.
   * @returns {Object} Returns `object`.
   * @see _.forOwn
   * @example
   *
   * function Foo() {
   *   this.a = 1;
   *   this.b = 2;
   * }
   *
   * Foo.prototype.c = 3;
   *
   * _.forOwnRight(new Foo, function(value, key) {
   *   console.log(key);
   * });
   * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'.
   */
  function forOwnRight(object, iteratee) {
    return object && baseForOwnRight(object, getIteratee(iteratee, 3));
  }

  /**
   * Creates an array of function property names from own enumerable properties
   * of `object`.
   *
   * @static
   * @since 0.1.0
   * @memberOf _
   * @category Object
   * @param {Object} object The object to inspect.
   * @returns {Array} Returns the function names.
   * @see _.functionsIn
   * @example
   *
   * function Foo() {
   *   this.a = _.constant('a');
   *   this.b = _.constant('b');
   * }
   *
   * Foo.prototype.c = _.constant('c');
   *
   * _.functions(new Foo);
   * // => ['a', 'b']
   */
  function functions(object) {
    return object == null ? [] : baseFunctions(object, keys(object));
  }

  /**
   * Creates an array of function property names from own and inherited
   * enumerable properties of `object`.
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category Object
   * @param {Object} object The object to inspect.
   * @returns {Array} Returns the function names.
   * @see _.functions
   * @example
   *
   * function Foo() {
   *   this.a = _.constant('a');
   *   this.b = _.constant('b');
   * }
   *
   * Foo.prototype.c = _.constant('c');
   *
   * _.functionsIn(new Foo);
   * // => ['a', 'b', 'c']
   */
  function functionsIn(object) {
    return object == null ? [] : baseFunctions(object, keysIn(object));
  }

  /**
   * 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;
  }

  /**
   * Checks if `path` is a direct property of `object`.
   *
   * @static
   * @since 0.1.0
   * @memberOf _
   * @category Object
   * @param {Object} object The object to query.
   * @param {Array|string} path The path to check.
   * @returns {boolean} Returns `true` if `path` exists, else `false`.
   * @example
   *
   * var object = { 'a': { 'b': 2 } };
   * var other = _.create({ 'a': _.create({ 'b': 2 }) });
   *
   * _.has(object, 'a');
   * // => true
   *
   * _.has(object, 'a.b');
   * // => true
   *
   * _.has(object, ['a', 'b']);
   * // => true
   *
   * _.has(other, 'a');
   * // => false
   */
  function has(object, path) {
    return object != null && hasPath(object, path, baseHas);
  }

  /**
   * 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);
  }

  /**
   * Creates an object composed of the inverted keys and values of `object`.
   * If `object` contains duplicate values, subsequent values overwrite
   * property assignments of previous values.
   *
   * @static
   * @memberOf _
   * @since 0.7.0
   * @category Object
   * @param {Object} object The object to invert.
   * @returns {Object} Returns the new inverted object.
   * @example
   *
   * var object = { 'a': 1, 'b': 2, 'c': 1 };
   *
   * _.invert(object);
   * // => { '1': 'c', '2': 'b' }
   */
  var invert = createInverter(function(result, value, key) {
    result[value] = key;
  }, constant(identity));

  /**
   * This method is like `_.invert` except that the inverted object is generated
   * from the results of running each element of `object` thru `iteratee`. The
   * corresponding inverted value of each inverted key is an array of keys
   * responsible for generating the inverted value. The iteratee is invoked
   * with one argument: (value).
   *
   * @static
   * @memberOf _
   * @since 4.1.0
   * @category Object
   * @param {Object} object The object to invert.
   * @param {Array|Function|Object|string} [iteratee=_.identity]
   *  The iteratee invoked per element.
   * @returns {Object} Returns the new inverted object.
   * @example
   *
   * var object = { 'a': 1, 'b': 2, 'c': 1 };
   *
   * _.invertBy(object);
   * // => { '1': ['a', 'c'], '2': ['b'] }
   *
   * _.invertBy(object, function(value) {
   *   return 'group' + value;
   * });
   * // => { 'group1': ['a', 'c'], 'group2': ['b'] }
   */
  var invertBy = createInverter(function(result, value, key) {
    if (hasOwnProperty.call(result, value)) {
      result[value].push(key);
    } else {
      result[value] = [key];
    }
  }, getIteratee);

  /**
   * Invokes the method at `path` of `object`.
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category Object
   * @param {Object} object The object to query.
   * @param {Array|string} path The path of the method to invoke.
   * @param {...*} [args] The arguments to invoke the method with.
   * @returns {*} Returns the result of the invoked method.
   * @example
   *
   * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] };
   *
   * _.invoke(object, 'a[0].b.c.slice', 1, 3);
   * // => [2, 3]
   */
  var invoke = rest(baseInvoke);

  /**
   * 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;

    for (var key in object) {
      if (baseHas(object, key) &&
          !(skipIndexes && (key == 'length' || isIndex(key, length))) &&
          !(isProto && key == 'constructor')) {
        result.push(key);
      }
    }
    return result;
  }

  /**
   * 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;

    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;
  }

  /**
   * The opposite of `_.mapValues`; this method creates an object with the
   * same values as `object` and keys generated by running each own enumerable
   * string keyed property of `object` thru `iteratee`. The iteratee is invoked
   * with three arguments: (value, key, object).
   *
   * @static
   * @memberOf _
   * @since 3.8.0
   * @category Object
   * @param {Object} object The object to iterate over.
   * @param {Array|Function|Object|string} [iteratee=_.identity]
   *  The function invoked per iteration.
   * @returns {Object} Returns the new mapped object.
   * @see _.mapValues
   * @example
   *
   * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {
   *   return key + value;
   * });
   * // => { 'a1': 1, 'b2': 2 }
   */
  function mapKeys(object, iteratee) {
    var result = {};
    iteratee = getIteratee(iteratee, 3);

    baseForOwn(object, function(value, key, object) {
      result[iteratee(value, key, object)] = value;
    });
    return result;
  }

  /**
   * Creates an object with the same keys as `object` and values generated
   * by running each own enumerable string keyed property of `object` thru
   * `iteratee`. The iteratee is invoked with three arguments:
   * (value, key, object).
   *
   * @static
   * @memberOf _
   * @since 2.4.0
   * @category Object
   * @param {Object} object The object to iterate over.
   * @param {Array|Function|Object|string} [iteratee=_.identity]
   *  The function invoked per iteration.
   * @returns {Object} Returns the new mapped object.
   * @see _.mapKeys
   * @example
   *
   * var users = {
   *   'fred':    { 'user': 'fred',    'age': 40 },
   *   'pebbles': { 'user': 'pebbles', 'age': 1 }
   * };
   *
   * _.mapValues(users, function(o) { return o.age; });
   * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
   *
   * // The `_.property` iteratee shorthand.
   * _.mapValues(users, 'age');
   * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
   */
  function mapValues(object, iteratee) {
    var result = {};
    iteratee = getIteratee(iteratee, 3);

    baseForOwn(object, function(value, key, object) {
      result[key] = iteratee(value, key, object);
    });
    return result;
  }

  /**
   * This method is like `_.assign` except that it recursively merges own and
   * inherited enumerable string keyed properties of source objects into the
   * destination object. Source properties that resolve to `undefined` are
   * skipped if a destination value exists. Array and plain object properties
   * are merged recursively. Other objects and value types are overridden by
   * assignment. Source objects are applied from left to right. Subsequent
   * sources overwrite property assignments of previous sources.
   *
   * **Note:** This method mutates `object`.
   *
   * @static
   * @memberOf _
   * @since 0.5.0
   * @category Object
   * @param {Object} object The destination object.
   * @param {...Object} [sources] The source objects.
   * @returns {Object} Returns `object`.
   * @example
   *
   * var users = {
   *   'data': [{ 'user': 'barney' }, { 'user': 'fred' }]
   * };
   *
   * var ages = {
   *   'data': [{ 'age': 36 }, { 'age': 40 }]
   * };
   *
   * _.merge(users, ages);
   * // => { 'data': [{ 'user': 'barney', 'age': 36 }, { 'user': 'fred', 'age': 40 }] }
   */
  var merge = createAssigner(function(object, source, srcIndex) {
    baseMerge(object, source, srcIndex);
  });

  /**
   * This method is like `_.merge` except that it accepts `customizer` which
   * is invoked to produce the merged values of the destination and source
   * properties. If `customizer` returns `undefined`, merging is handled by the
   * method instead. The `customizer` is invoked with seven arguments:
   * (objValue, srcValue, key, object, source, stack).
   *
   * **Note:** This method mutates `object`.
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category Object
   * @param {Object} object The destination object.
   * @param {...Object} sources The source objects.
   * @param {Function} customizer The function to customize assigned values.
   * @returns {Object} Returns `object`.
   * @example
   *
   * function customizer(objValue, srcValue) {
   *   if (_.isArray(objValue)) {
   *     return objValue.concat(srcValue);
   *   }
   * }
   *
   * var object = {
   *   'fruits': ['apple'],
   *   'vegetables': ['beet']
   * };
   *
   * var other = {
   *   'fruits': ['banana'],
   *   'vegetables': ['carrot']
   * };
   *
   * _.mergeWith(object, other, customizer);
   * // => { 'fruits': ['apple', 'banana'], 'vegetables': ['beet', 'carrot'] }
   */
  var mergeWith = createAssigner(function(object, source, srcIndex, customizer) {
    baseMerge(object, source, srcIndex, customizer);
  });

  /**
   * The opposite of `_.pick`; this method creates an object composed of the
   * own and inherited enumerable string keyed properties of `object` that are
   * not omitted.
   *
   * @static
   * @since 0.1.0
   * @memberOf _
   * @category Object
   * @param {Object} object The source object.
   * @param {...(string|string[])} [props] The property identifiers to omit.
   * @returns {Object} Returns the new object.
   * @example
   *
   * var object = { 'a': 1, 'b': '2', 'c': 3 };
   *
   * _.omit(object, ['a', 'c']);
   * // => { 'b': '2' }
   */
  var omit = rest(function(object, props) {
    if (object == null) {
      return {};
    }
    props = arrayMap(baseFlatten(props, 1), toKey);
    return basePick(object, baseDifference(getAllKeysIn(object), props));
  });

  /**
   * The opposite of `_.pickBy`; this method creates an object composed of
   * the own and inherited enumerable string keyed properties of `object` that
   * `predicate` doesn't return truthy for. The predicate is invoked with two
   * arguments: (value, key).
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category Object
   * @param {Object} object The source object.
   * @param {Array|Function|Object|string} [predicate=_.identity]
   *  The function invoked per property.
   * @returns {Object} Returns the new object.
   * @example
   *
   * var object = { 'a': 1, 'b': '2', 'c': 3 };
   *
   * _.omitBy(object, _.isNumber);
   * // => { 'b': '2' }
   */
  function omitBy(object, predicate) {
    predicate = getIteratee(predicate);
    return basePickBy(object, function(value, key) {
      return !predicate(value, key);
    });
  }

  /**
   * Creates an object composed of the picked `object` properties.
   *
   * @static
   * @since 0.1.0
   * @memberOf _
   * @category Object
   * @param {Object} object The source object.
   * @param {...(string|string[])} [props] The property identifiers to pick.
   * @returns {Object} Returns the new object.
   * @example
   *
   * var object = { 'a': 1, 'b': '2', 'c': 3 };
   *
   * _.pick(object, ['a', 'c']);
   * // => { 'a': 1, 'c': 3 }
   */
  var pick = rest(function(object, props) {
    return object == null ? {} : basePick(object, arrayMap(baseFlatten(props, 1), toKey));
  });

  /**
   * Creates an object composed of the `object` properties `predicate` returns
   * truthy for. The predicate is invoked with two arguments: (value, key).
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category Object
   * @param {Object} object The source object.
   * @param {Array|Function|Object|string} [predicate=_.identity]
   *  The function invoked per property.
   * @returns {Object} Returns the new object.
   * @example
   *
   * var object = { 'a': 1, 'b': '2', 'c': 3 };
   *
   * _.pickBy(object, _.isNumber);
   * // => { 'a': 1, 'c': 3 }
   */
  function pickBy(object, predicate) {
    return object == null ? {} : basePickBy(object, getIteratee(predicate));
  }

  /**
   * This method is like `_.get` except that if the resolved value is a
   * function it's invoked with the `this` binding of its parent object and
   * its result is returned.
   *
   * @static
   * @since 0.1.0
   * @memberOf _
   * @category Object
   * @param {Object} object The object to query.
   * @param {Array|string} path The path of the property to resolve.
   * @param {*} [defaultValue] The value returned for `undefined` resolved values.
   * @returns {*} Returns the resolved value.
   * @example
   *
   * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };
   *
   * _.result(object, 'a[0].b.c1');
   * // => 3
   *
   * _.result(object, 'a[0].b.c2');
   * // => 4
   *
   * _.result(object, 'a[0].b.c3', 'default');
   * // => 'default'
   *
   * _.result(object, 'a[0].b.c3', _.constant('default'));
   * // => 'default'
   */
  function result(object, path, defaultValue) {
    path = isKey(path, object) ? [path] : castPath(path);

    var index = -1,
        length = path.length;

    // Ensure the loop is entered when path is empty.
    if (!length) {
      object = undefined;
      length = 1;
    }
    while (++index < length) {
      var value = object == null ? undefined : object[toKey(path[index])];
      if (value === undefined) {
        index = length;
        value = defaultValue;
      }
      object = isFunction(value) ? value.call(object) : value;
    }
    return object;
  }

  /**
   * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,
   * it's created. Arrays are created for missing index properties while objects
   * are created for all other missing properties. Use `_.setWith` to customize
   * `path` creation.
   *
   * **Note:** This method mutates `object`.
   *
   * @static
   * @memberOf _
   * @since 3.7.0
   * @category Object
   * @param {Object} object The object to modify.
   * @param {Array|string} path The path of the property to set.
   * @param {*} value The value to set.
   * @returns {Object} Returns `object`.
   * @example
   *
   * var object = { 'a': [{ 'b': { 'c': 3 } }] };
   *
   * _.set(object, 'a[0].b.c', 4);
   * console.log(object.a[0].b.c);
   * // => 4
   *
   * _.set(object, ['x', '0', 'y', 'z'], 5);
   * console.log(object.x[0].y.z);
   * // => 5
   */
  function set(object, path, value) {
    return object == null ? object : baseSet(object, path, value);
  }

  /**
   * This method is like `_.set` except that it accepts `customizer` which is
   * invoked to produce the objects of `path`.  If `customizer` returns `undefined`
   * path creation is handled by the method instead. The `customizer` is invoked
   * with three arguments: (nsValue, key, nsObject).
   *
   * **Note:** This method mutates `object`.
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category Object
   * @param {Object} object The object to modify.
   * @param {Array|string} path The path of the property to set.
   * @param {*} value The value to set.
   * @param {Function} [customizer] The function to customize assigned values.
   * @returns {Object} Returns `object`.
   * @example
   *
   * var object = {};
   *
   * _.setWith(object, '[0][1]', 'a', Object);
   * // => { '0': { '1': 'a' } }
   */
  function setWith(object, path, value, customizer) {
    customizer = typeof customizer == 'function' ? customizer : undefined;
    return object == null ? object : baseSet(object, path, value, customizer);
  }

  /**
   * Creates an array of own enumerable string keyed-value pairs for `object`
   * which can be consumed by `_.fromPairs`. If `object` is a map or set, its
   * entries are returned.
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @alias entries
   * @category Object
   * @param {Object} object The object to query.
   * @returns {Array} Returns the key-value pairs.
   * @example
   *
   * function Foo() {
   *   this.a = 1;
   *   this.b = 2;
   * }
   *
   * Foo.prototype.c = 3;
   *
   * _.toPairs(new Foo);
   * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed)
   */
  var toPairs = createToPairs(keys);

  /**
   * Creates an array of own and inherited enumerable string keyed-value pairs
   * for `object` which can be consumed by `_.fromPairs`. If `object` is a map
   * or set, its entries are returned.
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @alias entriesIn
   * @category Object
   * @param {Object} object The object to query.
   * @returns {Array} Returns the key-value pairs.
   * @example
   *
   * function Foo() {
   *   this.a = 1;
   *   this.b = 2;
   * }
   *
   * Foo.prototype.c = 3;
   *
   * _.toPairsIn(new Foo);
   * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed)
   */
  var toPairsIn = createToPairs(keysIn);

  /**
   * An alternative to `_.reduce`; this method transforms `object` to a new
   * `accumulator` object which is the result of running each of its own
   * enumerable string keyed properties thru `iteratee`, with each invocation
   * potentially mutating the `accumulator` object. If `accumulator` is not
   * provided, a new object with the same `[[Prototype]]` will be used. The
   * iteratee is invoked with four arguments: (accumulator, value, key, object).
   * Iteratee functions may exit iteration early by explicitly returning `false`.
   *
   * @static
   * @memberOf _
   * @since 1.3.0
   * @category Object
   * @param {Object} object The object to iterate over.
   * @param {Function} [iteratee=_.identity] The function invoked per iteration.
   * @param {*} [accumulator] The custom accumulator value.
   * @returns {*} Returns the accumulated value.
   * @example
   *
   * _.transform([2, 3, 4], function(result, n) {
   *   result.push(n *= n);
   *   return n % 2 == 0;
   * }, []);
   * // => [4, 9]
   *
   * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
   *   (result[value] || (result[value] = [])).push(key);
   * }, {});
   * // => { '1': ['a', 'c'], '2': ['b'] }
   */
  function transform(object, iteratee, accumulator) {
    var isArr = isArray(object) || isTypedArray(object);
    iteratee = getIteratee(iteratee, 4);

    if (accumulator == null) {
      if (isArr || isObject(object)) {
        var Ctor = object.constructor;
        if (isArr) {
          accumulator = isArray(object) ? new Ctor : [];
        } else {
          accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};
        }
      } else {
        accumulator = {};
      }
    }
    (isArr ? arrayEach : baseForOwn)(object, function(value, index, object) {
      return iteratee(accumulator, value, index, object);
    });
    return accumulator;
  }

  /**
   * Removes the property at `path` of `object`.
   *
   * **Note:** This method mutates `object`.
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category Object
   * @param {Object} object The object to modify.
   * @param {Array|string} path The path of the property to unset.
   * @returns {boolean} Returns `true` if the property is deleted, else `false`.
   * @example
   *
   * var object = { 'a': [{ 'b': { 'c': 7 } }] };
   * _.unset(object, 'a[0].b.c');
   * // => true
   *
   * console.log(object);
   * // => { 'a': [{ 'b': {} }] };
   *
   * _.unset(object, ['a', '0', 'b', 'c']);
   * // => true
   *
   * console.log(object);
   * // => { 'a': [{ 'b': {} }] };
   */
  function unset(object, path) {
    return object == null ? true : baseUnset(object, path);
  }

  /**
   * This method is like `_.set` except that accepts `updater` to produce the
   * value to set. Use `_.updateWith` to customize `path` creation. The `updater`
   * is invoked with one argument: (value).
   *
   * **Note:** This method mutates `object`.
   *
   * @static
   * @memberOf _
   * @since 4.6.0
   * @category Object
   * @param {Object} object The object to modify.
   * @param {Array|string} path The path of the property to set.
   * @param {Function} updater The function to produce the updated value.
   * @returns {Object} Returns `object`.
   * @example
   *
   * var object = { 'a': [{ 'b': { 'c': 3 } }] };
   *
   * _.update(object, 'a[0].b.c', function(n) { return n * n; });
   * console.log(object.a[0].b.c);
   * // => 9
   *
   * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; });
   * console.log(object.x[0].y.z);
   * // => 0
   */
  function update(object, path, updater) {
    return object == null ? object : baseUpdate(object, path, castFunction(updater));
  }

  /**
   * This method is like `_.update` except that it accepts `customizer` which is
   * invoked to produce the objects of `path`.  If `customizer` returns `undefined`
   * path creation is handled by the method instead. The `customizer` is invoked
   * with three arguments: (nsValue, key, nsObject).
   *
   * **Note:** This method mutates `object`.
   *
   * @static
   * @memberOf _
   * @since 4.6.0
   * @category Object
   * @param {Object} object The object to modify.
   * @param {Array|string} path The path of the property to set.
   * @param {Function} updater The function to produce the updated value.
   * @param {Function} [customizer] The function to customize assigned values.
   * @returns {Object} Returns `object`.
   * @example
   *
   * var object = {};
   *
   * _.updateWith(object, '[0][1]', _.constant('a'), Object);
   * // => { '0': { '1': 'a' } }
   */
  function updateWith(object, path, updater, customizer) {
    customizer = typeof customizer == 'function' ? customizer : undefined;
    return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer);
  }

  /**
   * Creates an array of the own enumerable string keyed property values of `object`.
   *
   * **Note:** Non-object values are coerced to objects.
   *
   * @static
   * @since 0.1.0
   * @memberOf _
   * @category Object
   * @param {Object} object The object to query.
   * @returns {Array} Returns the array of property values.
   * @example
   *
   * function Foo() {
   *   this.a = 1;
   *   this.b = 2;
   * }
   *
   * Foo.prototype.c = 3;
   *
   * _.values(new Foo);
   * // => [1, 2] (iteration order is not guaranteed)
   *
   * _.values('hi');
   * // => ['h', 'i']
   */
  function values(object) {
    return object ? baseValues(object, keys(object)) : [];
  }

  /**
   * Creates an array of the own and inherited enumerable string keyed property
   * values 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 values.
   * @example
   *
   * function Foo() {
   *   this.a = 1;
   *   this.b = 2;
   * }
   *
   * Foo.prototype.c = 3;
   *
   * _.valuesIn(new Foo);
   * // => [1, 2, 3] (iteration order is not guaranteed)
   */
  function valuesIn(object) {
    return object == null ? [] : baseValues(object, keysIn(object));
  }

  /*------------------------------------------------------------------------*/

  /**
   * Clamps `number` within the inclusive `lower` and `upper` bounds.
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category Number
   * @param {number} number The number to clamp.
   * @param {number} [lower] The lower bound.
   * @param {number} upper The upper bound.
   * @returns {number} Returns the clamped number.
   * @example
   *
   * _.clamp(-10, -5, 5);
   * // => -5
   *
   * _.clamp(10, -5, 5);
   * // => 5
   */
  function clamp(number, lower, upper) {
    if (upper === undefined) {
      upper = lower;
      lower = undefined;
    }
    if (upper !== undefined) {
      upper = toNumber(upper);
      upper = upper === upper ? upper : 0;
    }
    if (lower !== undefined) {
      lower = toNumber(lower);
      lower = lower === lower ? lower : 0;
    }
    return baseClamp(toNumber(number), lower, upper);
  }

  /**
   * Checks if `n` is between `start` and up to, but not including, `end`. If
   * `end` is not specified, it's set to `start` with `start` then set to `0`.
   * If `start` is greater than `end` the params are swapped to support
   * negative ranges.
   *
   * @static
   * @memberOf _
   * @since 3.3.0
   * @category Number
   * @param {number} number The number to check.
   * @param {number} [start=0] The start of the range.
   * @param {number} end The end of the range.
   * @returns {boolean} Returns `true` if `number` is in the range, else `false`.
   * @see _.range, _.rangeRight
   * @example
   *
   * _.inRange(3, 2, 4);
   * // => true
   *
   * _.inRange(4, 8);
   * // => true
   *
   * _.inRange(4, 2);
   * // => false
   *
   * _.inRange(2, 2);
   * // => false
   *
   * _.inRange(1.2, 2);
   * // => true
   *
   * _.inRange(5.2, 4);
   * // => false
   *
   * _.inRange(-3, -2, -6);
   * // => true
   */
  function inRange(number, start, end) {
    start = toNumber(start) || 0;
    if (end === undefined) {
      end = start;
      start = 0;
    } else {
      end = toNumber(end) || 0;
    }
    number = toNumber(number);
    return baseInRange(number, start, end);
  }

  /**
   * Produces a random number between the inclusive `lower` and `upper` bounds.
   * If only one argument is provided a number between `0` and the given number
   * is returned. If `floating` is `true`, or either `lower` or `upper` are
   * floats, a floating-point number is returned instead of an integer.
   *
   * **Note:** JavaScript follows the IEEE-754 standard for resolving
   * floating-point values which can produce unexpected results.
   *
   * @static
   * @memberOf _
   * @since 0.7.0
   * @category Number
   * @param {number} [lower=0] The lower bound.
   * @param {number} [upper=1] The upper bound.
   * @param {boolean} [floating] Specify returning a floating-point number.
   * @returns {number} Returns the random number.
   * @example
   *
   * _.random(0, 5);
   * // => an integer between 0 and 5
   *
   * _.random(5);
   * // => also an integer between 0 and 5
   *
   * _.random(5, true);
   * // => a floating-point number between 0 and 5
   *
   * _.random(1.2, 5.2);
   * // => a floating-point number between 1.2 and 5.2
   */
  function random(lower, upper, floating) {
    if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) {
      upper = floating = undefined;
    }
    if (floating === undefined) {
      if (typeof upper == 'boolean') {
        floating = upper;
        upper = undefined;
      }
      else if (typeof lower == 'boolean') {
        floating = lower;
        lower = undefined;
      }
    }
    if (lower === undefined && upper === undefined) {
      lower = 0;
      upper = 1;
    }
    else {
      lower = toNumber(lower) || 0;
      if (upper === undefined) {
        upper = lower;
        lower = 0;
      } else {
        upper = toNumber(upper) || 0;
      }
    }
    if (lower > upper) {
      var temp = lower;
      lower = upper;
      upper = temp;
    }
    if (floating || lower % 1 || upper % 1) {
      var rand = nativeRandom();
      return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper);
    }
    return baseRandom(lower, upper);
  }

  /*------------------------------------------------------------------------*/

  /**
   * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).
   *
   * @static
   * @memberOf _
   * @since 3.0.0
   * @category String
   * @param {string} [string=''] The string to convert.
   * @returns {string} Returns the camel cased string.
   * @example
   *
   * _.camelCase('Foo Bar');
   * // => 'fooBar'
   *
   * _.camelCase('--foo-bar--');
   * // => 'fooBar'
   *
   * _.camelCase('__FOO_BAR__');
   * // => 'fooBar'
   */
  var camelCase = createCompounder(function(result, word, index) {
    word = word.toLowerCase();
    return result + (index ? capitalize(word) : word);
  });

  /**
   * Converts the first character of `string` to upper case and the remaining
   * to lower case.
   *
   * @static
   * @memberOf _
   * @since 3.0.0
   * @category String
   * @param {string} [string=''] The string to capitalize.
   * @returns {string} Returns the capitalized string.
   * @example
   *
   * _.capitalize('FRED');
   * // => 'Fred'
   */
  function capitalize(string) {
    return upperFirst(toString(string).toLowerCase());
  }

  /**
   * Deburrs `string` by converting
   * [latin-1 supplementary letters](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
   * to basic latin letters and removing
   * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).
   *
   * @static
   * @memberOf _
   * @since 3.0.0
   * @category String
   * @param {string} [string=''] The string to deburr.
   * @returns {string} Returns the deburred string.
   * @example
   *
   * _.deburr('déjà vu');
   * // => 'deja vu'
   */
  function deburr(string) {
    string = toString(string);
    return string && string.replace(reLatin1, deburrLetter).replace(reComboMark, '');
  }

  /**
   * Checks if `string` ends with the given target string.
   *
   * @static
   * @memberOf _
   * @since 3.0.0
   * @category String
   * @param {string} [string=''] The string to search.
   * @param {string} [target] The string to search for.
   * @param {number} [position=string.length] The position to search up to.
   * @returns {boolean} Returns `true` if `string` ends with `target`,
   *  else `false`.
   * @example
   *
   * _.endsWith('abc', 'c');
   * // => true
   *
   * _.endsWith('abc', 'b');
   * // => false
   *
   * _.endsWith('abc', 'b', 2);
   * // => true
   */
  function endsWith(string, target, position) {
    string = toString(string);
    target = baseToString(target);

    var length = string.length;
    position = position === undefined
      ? length
      : baseClamp(toInteger(position), 0, length);

    position -= target.length;
    return position >= 0 && string.indexOf(target, position) == position;
  }

  /**
   * Converts the characters "&", "<", ">", '"', "'", and "\`" in `string` to
   * their corresponding HTML entities.
   *
   * **Note:** No other characters are escaped. To escape additional
   * characters use a third-party library like [_he_](https://mths.be/he).
   *
   * Though the ">" character is escaped for symmetry, characters like
   * ">" and "/" don't need escaping in HTML and have no special meaning
   * unless they're part of a tag or unquoted attribute value. See
   * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)
   * (under "semi-related fun fact") for more details.
   *
   * Backticks are escaped because in IE < 9, they can break out of
   * attribute values or HTML comments. See [#59](https://html5sec.org/#59),
   * [#102](https://html5sec.org/#102), [#108](https://html5sec.org/#108), and
   * [#133](https://html5sec.org/#133) of the
   * [HTML5 Security Cheatsheet](https://html5sec.org/) for more details.
   *
   * When working with HTML you should always
   * [quote attribute values](http://wonko.com/post/html-escaping) to reduce
   * XSS vectors.
   *
   * @static
   * @since 0.1.0
   * @memberOf _
   * @category String
   * @param {string} [string=''] The string to escape.
   * @returns {string} Returns the escaped string.
   * @example
   *
   * _.escape('fred, barney, & pebbles');
   * // => 'fred, barney, &amp; pebbles'
   */
  function escape(string) {
    string = toString(string);
    return (string && reHasUnescapedHtml.test(string))
      ? string.replace(reUnescapedHtml, escapeHtmlChar)
      : string;
  }

  /**
   * Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+",
   * "?", "(", ")", "[", "]", "{", "}", and "|" in `string`.
   *
   * @static
   * @memberOf _
   * @since 3.0.0
   * @category String
   * @param {string} [string=''] The string to escape.
   * @returns {string} Returns the escaped string.
   * @example
   *
   * _.escapeRegExp('[lodash](https://lodash.com/)');
   * // => '\[lodash\]\(https://lodash\.com/\)'
   */
  function escapeRegExp(string) {
    string = toString(string);
    return (string && reHasRegExpChar.test(string))
      ? string.replace(reRegExpChar, '\\$&')
      : string;
  }

  /**
   * Converts `string` to
   * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).
   *
   * @static
   * @memberOf _
   * @since 3.0.0
   * @category String
   * @param {string} [string=''] The string to convert.
   * @returns {string} Returns the kebab cased string.
   * @example
   *
   * _.kebabCase('Foo Bar');
   * // => 'foo-bar'
   *
   * _.kebabCase('fooBar');
   * // => 'foo-bar'
   *
   * _.kebabCase('__FOO_BAR__');
   * // => 'foo-bar'
   */
  var kebabCase = createCompounder(function(result, word, index) {
    return result + (index ? '-' : '') + word.toLowerCase();
  });

  /**
   * Converts `string`, as space separated words, to lower case.
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category String
   * @param {string} [string=''] The string to convert.
   * @returns {string} Returns the lower cased string.
   * @example
   *
   * _.lowerCase('--Foo-Bar--');
   * // => 'foo bar'
   *
   * _.lowerCase('fooBar');
   * // => 'foo bar'
   *
   * _.lowerCase('__FOO_BAR__');
   * // => 'foo bar'
   */
  var lowerCase = createCompounder(function(result, word, index) {
    return result + (index ? ' ' : '') + word.toLowerCase();
  });

  /**
   * Converts the first character of `string` to lower case.
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category String
   * @param {string} [string=''] The string to convert.
   * @returns {string} Returns the converted string.
   * @example
   *
   * _.lowerFirst('Fred');
   * // => 'fred'
   *
   * _.lowerFirst('FRED');
   * // => 'fRED'
   */
  var lowerFirst = createCaseFirst('toLowerCase');

  /**
   * Pads `string` on the left and right sides if it's shorter than `length`.
   * Padding characters are truncated if they can't be evenly divided by `length`.
   *
   * @static
   * @memberOf _
   * @since 3.0.0
   * @category String
   * @param {string} [string=''] The string to pad.
   * @param {number} [length=0] The padding length.
   * @param {string} [chars=' '] The string used as padding.
   * @returns {string} Returns the padded string.
   * @example
   *
   * _.pad('abc', 8);
   * // => '  abc   '
   *
   * _.pad('abc', 8, '_-');
   * // => '_-abc_-_'
   *
   * _.pad('abc', 3);
   * // => 'abc'
   */
  function pad(string, length, chars) {
    string = toString(string);
    length = toInteger(length);

    var strLength = length ? stringSize(string) : 0;
    if (!length || strLength >= length) {
      return string;
    }
    var mid = (length - strLength) / 2;
    return (
      createPadding(nativeFloor(mid), chars) +
      string +
      createPadding(nativeCeil(mid), chars)
    );
  }

  /**
   * Pads `string` on the right side if it's shorter than `length`. Padding
   * characters are truncated if they exceed `length`.
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category String
   * @param {string} [string=''] The string to pad.
   * @param {number} [length=0] The padding length.
   * @param {string} [chars=' '] The string used as padding.
   * @returns {string} Returns the padded string.
   * @example
   *
   * _.padEnd('abc', 6);
   * // => 'abc   '
   *
   * _.padEnd('abc', 6, '_-');
   * // => 'abc_-_'
   *
   * _.padEnd('abc', 3);
   * // => 'abc'
   */
  function padEnd(string, length, chars) {
    string = toString(string);
    length = toInteger(length);

    var strLength = length ? stringSize(string) : 0;
    return (length && strLength < length)
      ? (string + createPadding(length - strLength, chars))
      : string;
  }

  /**
   * Pads `string` on the left side if it's shorter than `length`. Padding
   * characters are truncated if they exceed `length`.
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category String
   * @param {string} [string=''] The string to pad.
   * @param {number} [length=0] The padding length.
   * @param {string} [chars=' '] The string used as padding.
   * @returns {string} Returns the padded string.
   * @example
   *
   * _.padStart('abc', 6);
   * // => '   abc'
   *
   * _.padStart('abc', 6, '_-');
   * // => '_-_abc'
   *
   * _.padStart('abc', 3);
   * // => 'abc'
   */
  function padStart(string, length, chars) {
    string = toString(string);
    length = toInteger(length);

    var strLength = length ? stringSize(string) : 0;
    return (length && strLength < length)
      ? (createPadding(length - strLength, chars) + string)
      : string;
  }

  /**
   * Converts `string` to an integer of the specified radix. If `radix` is
   * `undefined` or `0`, a `radix` of `10` is used unless `value` is a
   * hexadecimal, in which case a `radix` of `16` is used.
   *
   * **Note:** This method aligns with the
   * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`.
   *
   * @static
   * @memberOf _
   * @since 1.1.0
   * @category String
   * @param {string} string The string to convert.
   * @param {number} [radix=10] The radix to interpret `value` by.
   * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
   * @returns {number} Returns the converted integer.
   * @example
   *
   * _.parseInt('08');
   * // => 8
   *
   * _.map(['6', '08', '10'], _.parseInt);
   * // => [6, 8, 10]
   */
  function parseInt(string, radix, guard) {
    // Chrome fails to trim leading <BOM> whitespace characters.
    // See https://bugs.chromium.org/p/v8/issues/detail?id=3109 for more details.
    if (guard || radix == null) {
      radix = 0;
    } else if (radix) {
      radix = +radix;
    }
    string = toString(string).replace(reTrim, '');
    return nativeParseInt(string, radix || (reHasHexPrefix.test(string) ? 16 : 10));
  }

  /**
   * Repeats the given string `n` times.
   *
   * @static
   * @memberOf _
   * @since 3.0.0
   * @category String
   * @param {string} [string=''] The string to repeat.
   * @param {number} [n=1] The number of times to repeat the string.
   * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
   * @returns {string} Returns the repeated string.
   * @example
   *
   * _.repeat('*', 3);
   * // => '***'
   *
   * _.repeat('abc', 2);
   * // => 'abcabc'
   *
   * _.repeat('abc', 0);
   * // => ''
   */
  function repeat(string, n, guard) {
    if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) {
      n = 1;
    } else {
      n = toInteger(n);
    }
    return baseRepeat(toString(string), n);
  }

  /**
   * Replaces matches for `pattern` in `string` with `replacement`.
   *
   * **Note:** This method is based on
   * [`String#replace`](https://mdn.io/String/replace).
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category String
   * @param {string} [string=''] The string to modify.
   * @param {RegExp|string} pattern The pattern to replace.
   * @param {Function|string} replacement The match replacement.
   * @returns {string} Returns the modified string.
   * @example
   *
   * _.replace('Hi Fred', 'Fred', 'Barney');
   * // => 'Hi Barney'
   */
  function replace() {
    var args = arguments,
        string = toString(args[0]);

    return args.length < 3 ? string : nativeReplace.call(string, args[1], args[2]);
  }

  /**
   * Converts `string` to
   * [snake case](https://en.wikipedia.org/wiki/Snake_case).
   *
   * @static
   * @memberOf _
   * @since 3.0.0
   * @category String
   * @param {string} [string=''] The string to convert.
   * @returns {string} Returns the snake cased string.
   * @example
   *
   * _.snakeCase('Foo Bar');
   * // => 'foo_bar'
   *
   * _.snakeCase('fooBar');
   * // => 'foo_bar'
   *
   * _.snakeCase('--FOO-BAR--');
   * // => 'foo_bar'
   */
  var snakeCase = createCompounder(function(result, word, index) {
    return result + (index ? '_' : '') + word.toLowerCase();
  });

  /**
   * Splits `string` by `separator`.
   *
   * **Note:** This method is based on
   * [`String#split`](https://mdn.io/String/split).
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category String
   * @param {string} [string=''] The string to split.
   * @param {RegExp|string} separator The separator pattern to split by.
   * @param {number} [limit] The length to truncate results to.
   * @returns {Array} Returns the string segments.
   * @example
   *
   * _.split('a-b-c', '-', 2);
   * // => ['a', 'b']
   */
  function split(string, separator, limit) {
    if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) {
      separator = limit = undefined;
    }
    limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0;
    if (!limit) {
      return [];
    }
    string = toString(string);
    if (string && (
          typeof separator == 'string' ||
          (separator != null && !isRegExp(separator))
        )) {
      separator = baseToString(separator);
      if (separator == '' && reHasComplexSymbol.test(string)) {
        return castSlice(stringToArray(string), 0, limit);
      }
    }
    return nativeSplit.call(string, separator, limit);
  }

  /**
   * Converts `string` to
   * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).
   *
   * @static
   * @memberOf _
   * @since 3.1.0
   * @category String
   * @param {string} [string=''] The string to convert.
   * @returns {string} Returns the start cased string.
   * @example
   *
   * _.startCase('--foo-bar--');
   * // => 'Foo Bar'
   *
   * _.startCase('fooBar');
   * // => 'Foo Bar'
   *
   * _.startCase('__FOO_BAR__');
   * // => 'FOO BAR'
   */
  var startCase = createCompounder(function(result, word, index) {
    return result + (index ? ' ' : '') + upperFirst(word);
  });

  /**
   * Checks if `string` starts with the given target string.
   *
   * @static
   * @memberOf _
   * @since 3.0.0
   * @category String
   * @param {string} [string=''] The string to search.
   * @param {string} [target] The string to search for.
   * @param {number} [position=0] The position to search from.
   * @returns {boolean} Returns `true` if `string` starts with `target`,
   *  else `false`.
   * @example
   *
   * _.startsWith('abc', 'a');
   * // => true
   *
   * _.startsWith('abc', 'b');
   * // => false
   *
   * _.startsWith('abc', 'b', 1);
   * // => true
   */
  function startsWith(string, target, position) {
    string = toString(string);
    position = baseClamp(toInteger(position), 0, string.length);
    return string.lastIndexOf(baseToString(target), position) == position;
  }

  /**
   * Creates a compiled template function that can interpolate data properties
   * in "interpolate" delimiters, HTML-escape interpolated data properties in
   * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data
   * properties may be accessed as free variables in the template. If a setting
   * object is given, it takes precedence over `_.templateSettings` values.
   *
   * **Note:** In the development build `_.template` utilizes
   * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)
   * for easier debugging.
   *
   * For more information on precompiling templates see
   * [lodash's custom builds documentation](https://lodash.com/custom-builds).
   *
   * For more information on Chrome extension sandboxes see
   * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).
   *
   * @static
   * @since 0.1.0
   * @memberOf _
   * @category String
   * @param {string} [string=''] The template string.
   * @param {Object} [options={}] The options object.
   * @param {RegExp} [options.escape=_.templateSettings.escape]
   *  The HTML "escape" delimiter.
   * @param {RegExp} [options.evaluate=_.templateSettings.evaluate]
   *  The "evaluate" delimiter.
   * @param {Object} [options.imports=_.templateSettings.imports]
   *  An object to import into the template as free variables.
   * @param {RegExp} [options.interpolate=_.templateSettings.interpolate]
   *  The "interpolate" delimiter.
   * @param {string} [options.sourceURL='lodash.templateSources[n]']
   *  The sourceURL of the compiled template.
   * @param {string} [options.variable='obj']
   *  The data object variable name.
   * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
   * @returns {Function} Returns the compiled template function.
   * @example
   *
   * // Use the "interpolate" delimiter to create a compiled template.
   * var compiled = _.template('hello <%= user %>!');
   * compiled({ 'user': 'fred' });
   * // => 'hello fred!'
   *
   * // Use the HTML "escape" delimiter to escape data property values.
   * var compiled = _.template('<b><%- value %></b>');
   * compiled({ 'value': '<script>' });
   * // => '<b>&lt;script&gt;</b>'
   *
   * // Use the "evaluate" delimiter to execute JavaScript and generate HTML.
   * var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>');
   * compiled({ 'users': ['fred', 'barney'] });
   * // => '<li>fred</li><li>barney</li>'
   *
   * // Use the internal `print` function in "evaluate" delimiters.
   * var compiled = _.template('<% print("hello " + user); %>!');
   * compiled({ 'user': 'barney' });
   * // => 'hello barney!'
   *
   * // Use the ES delimiter as an alternative to the default "interpolate" delimiter.
   * var compiled = _.template('hello ${ user }!');
   * compiled({ 'user': 'pebbles' });
   * // => 'hello pebbles!'
   *
   * // Use backslashes to treat delimiters as plain text.
   * var compiled = _.template('<%= "\\<%- value %\\>" %>');
   * compiled({ 'value': 'ignored' });
   * // => '<%- value %>'
   *
   * // Use the `imports` option to import `jQuery` as `jq`.
   * var text = '<% jq.each(users, function(user) { %><li><%- user %></li><% }); %>';
   * var compiled = _.template(text, { 'imports': { 'jq': jQuery } });
   * compiled({ 'users': ['fred', 'barney'] });
   * // => '<li>fred</li><li>barney</li>'
   *
   * // Use the `sourceURL` option to specify a custom sourceURL for the template.
   * var compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' });
   * compiled(data);
   * // => Find the source of "greeting.jst" under the Sources tab or Resources panel of the web inspector.
   *
   * // Use the `variable` option to ensure a with-statement isn't used in the compiled template.
   * var compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' });
   * compiled.source;
   * // => function(data) {
   * //   var __t, __p = '';
   * //   __p += 'hi ' + ((__t = ( data.user )) == null ? '' : __t) + '!';
   * //   return __p;
   * // }
   *
   * // Use custom template delimiters.
   * _.templateSettings.interpolate = /{{([\s\S]+?)}}/g;
   * var compiled = _.template('hello {{ user }}!');
   * compiled({ 'user': 'mustache' });
   * // => 'hello mustache!'
   *
   * // Use the `source` property to inline compiled templates for meaningful
   * // line numbers in error messages and stack traces.
   * fs.writeFileSync(path.join(process.cwd(), 'jst.js'), '\
   *   var JST = {\
   *     "main": ' + _.template(mainText).source + '\
   *   };\
   * ');
   */
  function template(string, options, guard) {
    // Based on John Resig's `tmpl` implementation
    // (http://ejohn.org/blog/javascript-micro-templating/)
    // and Laura Doktorova's doT.js (https://github.com/olado/doT).
    var settings = lodash.templateSettings;

    if (guard && isIterateeCall(string, options, guard)) {
      options = undefined;
    }
    string = toString(string);
    options = assignInWith({}, options, settings, assignInDefaults);

    var imports = assignInWith({}, options.imports, settings.imports, assignInDefaults),
        importsKeys = keys(imports),
        importsValues = baseValues(imports, importsKeys);

    var isEscaping,
        isEvaluating,
        index = 0,
        interpolate = options.interpolate || reNoMatch,
        source = "__p += '";

    // Compile the regexp to match each delimiter.
    var reDelimiters = RegExp(
      (options.escape || reNoMatch).source + '|' +
      interpolate.source + '|' +
      (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + '|' +
      (options.evaluate || reNoMatch).source + '|$'
    , 'g');

    // Use a sourceURL for easier debugging.
    var sourceURL = '//# sourceURL=' +
      ('sourceURL' in options
        ? options.sourceURL
        : ('lodash.templateSources[' + (++templateCounter) + ']')
      ) + '\n';

    string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {
      interpolateValue || (interpolateValue = esTemplateValue);

      // Escape characters that can't be included in string literals.
      source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar);

      // Replace delimiters with snippets.
      if (escapeValue) {
        isEscaping = true;
        source += "' +\n__e(" + escapeValue + ") +\n'";
      }
      if (evaluateValue) {
        isEvaluating = true;
        source += "';\n" + evaluateValue + ";\n__p += '";
      }
      if (interpolateValue) {
        source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'";
      }
      index = offset + match.length;

      // The JS engine embedded in Adobe products needs `match` returned in
      // order to produce the correct `offset` value.
      return match;
    });

    source += "';\n";

    // If `variable` is not specified wrap a with-statement around the generated
    // code to add the data object to the top of the scope chain.
    var variable = options.variable;
    if (!variable) {
      source = 'with (obj) {\n' + source + '\n}\n';
    }
    // Cleanup code by stripping empty strings.
    source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source)
      .replace(reEmptyStringMiddle, '$1')
      .replace(reEmptyStringTrailing, '$1;');

    // Frame code as the function body.
    source = 'function(' + (variable || 'obj') + ') {\n' +
      (variable
        ? ''
        : 'obj || (obj = {});\n'
      ) +
      "var __t, __p = ''" +
      (isEscaping
         ? ', __e = _.escape'
         : ''
      ) +
      (isEvaluating
        ? ', __j = Array.prototype.join;\n' +
          "function print() { __p += __j.call(arguments, '') }\n"
        : ';\n'
      ) +
      source +
      'return __p\n}';

    var result = attempt(function() {
      return Function(importsKeys, sourceURL + 'return ' + source)
        .apply(undefined, importsValues);
    });

    // Provide the compiled function's source by its `toString` method or
    // the `source` property as a convenience for inlining compiled templates.
    result.source = source;
    if (isError(result)) {
      throw result;
    }
    return result;
  }

  /**
   * Converts `string`, as a whole, to lower case just like
   * [String#toLowerCase](https://mdn.io/toLowerCase).
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category String
   * @param {string} [string=''] The string to convert.
   * @returns {string} Returns the lower cased string.
   * @example
   *
   * _.toLower('--Foo-Bar--');
   * // => '--foo-bar--'
   *
   * _.toLower('fooBar');
   * // => 'foobar'
   *
   * _.toLower('__FOO_BAR__');
   * // => '__foo_bar__'
   */
  function toLower(value) {
    return toString(value).toLowerCase();
  }

  /**
   * Converts `string`, as a whole, to upper case just like
   * [String#toUpperCase](https://mdn.io/toUpperCase).
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category String
   * @param {string} [string=''] The string to convert.
   * @returns {string} Returns the upper cased string.
   * @example
   *
   * _.toUpper('--foo-bar--');
   * // => '--FOO-BAR--'
   *
   * _.toUpper('fooBar');
   * // => 'FOOBAR'
   *
   * _.toUpper('__foo_bar__');
   * // => '__FOO_BAR__'
   */
  function toUpper(value) {
    return toString(value).toUpperCase();
  }

  /**
   * Removes leading and trailing whitespace or specified characters from `string`.
   *
   * @static
   * @memberOf _
   * @since 3.0.0
   * @category String
   * @param {string} [string=''] The string to trim.
   * @param {string} [chars=whitespace] The characters to trim.
   * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
   * @returns {string} Returns the trimmed string.
   * @example
   *
   * _.trim('  abc  ');
   * // => 'abc'
   *
   * _.trim('-_-abc-_-', '_-');
   * // => 'abc'
   *
   * _.map(['  foo  ', '  bar  '], _.trim);
   * // => ['foo', 'bar']
   */
  function trim(string, chars, guard) {
    string = toString(string);
    if (string && (guard || chars === undefined)) {
      return string.replace(reTrim, '');
    }
    if (!string || !(chars = baseToString(chars))) {
      return string;
    }
    var strSymbols = stringToArray(string),
        chrSymbols = stringToArray(chars),
        start = charsStartIndex(strSymbols, chrSymbols),
        end = charsEndIndex(strSymbols, chrSymbols) + 1;

    return castSlice(strSymbols, start, end).join('');
  }

  /**
   * Removes trailing whitespace or specified characters from `string`.
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category String
   * @param {string} [string=''] The string to trim.
   * @param {string} [chars=whitespace] The characters to trim.
   * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
   * @returns {string} Returns the trimmed string.
   * @example
   *
   * _.trimEnd('  abc  ');
   * // => '  abc'
   *
   * _.trimEnd('-_-abc-_-', '_-');
   * // => '-_-abc'
   */
  function trimEnd(string, chars, guard) {
    string = toString(string);
    if (string && (guard || chars === undefined)) {
      return string.replace(reTrimEnd, '');
    }
    if (!string || !(chars = baseToString(chars))) {
      return string;
    }
    var strSymbols = stringToArray(string),
        end = charsEndIndex(strSymbols, stringToArray(chars)) + 1;

    return castSlice(strSymbols, 0, end).join('');
  }

  /**
   * Removes leading whitespace or specified characters from `string`.
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category String
   * @param {string} [string=''] The string to trim.
   * @param {string} [chars=whitespace] The characters to trim.
   * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
   * @returns {string} Returns the trimmed string.
   * @example
   *
   * _.trimStart('  abc  ');
   * // => 'abc  '
   *
   * _.trimStart('-_-abc-_-', '_-');
   * // => 'abc-_-'
   */
  function trimStart(string, chars, guard) {
    string = toString(string);
    if (string && (guard || chars === undefined)) {
      return string.replace(reTrimStart, '');
    }
    if (!string || !(chars = baseToString(chars))) {
      return string;
    }
    var strSymbols = stringToArray(string),
        start = charsStartIndex(strSymbols, stringToArray(chars));

    return castSlice(strSymbols, start).join('');
  }

  /**
   * Truncates `string` if it's longer than the given maximum string length.
   * The last characters of the truncated string are replaced with the omission
   * string which defaults to "...".
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category String
   * @param {string} [string=''] The string to truncate.
   * @param {Object} [options={}] The options object.
   * @param {number} [options.length=30] The maximum string length.
   * @param {string} [options.omission='...'] The string to indicate text is omitted.
   * @param {RegExp|string} [options.separator] The separator pattern to truncate to.
   * @returns {string} Returns the truncated string.
   * @example
   *
   * _.truncate('hi-diddly-ho there, neighborino');
   * // => 'hi-diddly-ho there, neighbo...'
   *
   * _.truncate('hi-diddly-ho there, neighborino', {
   *   'length': 24,
   *   'separator': ' '
   * });
   * // => 'hi-diddly-ho there,...'
   *
   * _.truncate('hi-diddly-ho there, neighborino', {
   *   'length': 24,
   *   'separator': /,? +/
   * });
   * // => 'hi-diddly-ho there...'
   *
   * _.truncate('hi-diddly-ho there, neighborino', {
   *   'omission': ' [...]'
   * });
   * // => 'hi-diddly-ho there, neig [...]'
   */
  function truncate(string, options) {
    var length = DEFAULT_TRUNC_LENGTH,
        omission = DEFAULT_TRUNC_OMISSION;

    if (isObject(options)) {
      var separator = 'separator' in options ? options.separator : separator;
      length = 'length' in options ? toInteger(options.length) : length;
      omission = 'omission' in options ? baseToString(options.omission) : omission;
    }
    string = toString(string);

    var strLength = string.length;
    if (reHasComplexSymbol.test(string)) {
      var strSymbols = stringToArray(string);
      strLength = strSymbols.length;
    }
    if (length >= strLength) {
      return string;
    }
    var end = length - stringSize(omission);
    if (end < 1) {
      return omission;
    }
    var result = strSymbols
      ? castSlice(strSymbols, 0, end).join('')
      : string.slice(0, end);

    if (separator === undefined) {
      return result + omission;
    }
    if (strSymbols) {
      end += (result.length - end);
    }
    if (isRegExp(separator)) {
      if (string.slice(end).search(separator)) {
        var match,
            substring = result;

        if (!separator.global) {
          separator = RegExp(separator.source, toString(reFlags.exec(separator)) + 'g');
        }
        separator.lastIndex = 0;
        while ((match = separator.exec(substring))) {
          var newEnd = match.index;
        }
        result = result.slice(0, newEnd === undefined ? end : newEnd);
      }
    } else if (string.indexOf(baseToString(separator), end) != end) {
      var index = result.lastIndexOf(separator);
      if (index > -1) {
        result = result.slice(0, index);
      }
    }
    return result + omission;
  }

  /**
   * The inverse of `_.escape`; this method converts the HTML entities
   * `&amp;`, `&lt;`, `&gt;`, `&quot;`, `&#39;`, and `&#96;` in `string` to
   * their corresponding characters.
   *
   * **Note:** No other HTML entities are unescaped. To unescape additional
   * HTML entities use a third-party library like [_he_](https://mths.be/he).
   *
   * @static
   * @memberOf _
   * @since 0.6.0
   * @category String
   * @param {string} [string=''] The string to unescape.
   * @returns {string} Returns the unescaped string.
   * @example
   *
   * _.unescape('fred, barney, &amp; pebbles');
   * // => 'fred, barney, & pebbles'
   */
  function unescape(string) {
    string = toString(string);
    return (string && reHasEscapedHtml.test(string))
      ? string.replace(reEscapedHtml, unescapeHtmlChar)
      : string;
  }

  /**
   * Converts `string`, as space separated words, to upper case.
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category String
   * @param {string} [string=''] The string to convert.
   * @returns {string} Returns the upper cased string.
   * @example
   *
   * _.upperCase('--foo-bar');
   * // => 'FOO BAR'
   *
   * _.upperCase('fooBar');
   * // => 'FOO BAR'
   *
   * _.upperCase('__foo_bar__');
   * // => 'FOO BAR'
   */
  var upperCase = createCompounder(function(result, word, index) {
    return result + (index ? ' ' : '') + word.toUpperCase();
  });

  /**
   * Converts the first character of `string` to upper case.
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category String
   * @param {string} [string=''] The string to convert.
   * @returns {string} Returns the converted string.
   * @example
   *
   * _.upperFirst('fred');
   * // => 'Fred'
   *
   * _.upperFirst('FRED');
   * // => 'FRED'
   */
  var upperFirst = createCaseFirst('toUpperCase');

  /**
   * Splits `string` into an array of its words.
   *
   * @static
   * @memberOf _
   * @since 3.0.0
   * @category String
   * @param {string} [string=''] The string to inspect.
   * @param {RegExp|string} [pattern] The pattern to match words.
   * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
   * @returns {Array} Returns the words of `string`.
   * @example
   *
   * _.words('fred, barney, & pebbles');
   * // => ['fred', 'barney', 'pebbles']
   *
   * _.words('fred, barney, & pebbles', /[^, ]+/g);
   * // => ['fred', 'barney', '&', 'pebbles']
   */
  function words(string, pattern, guard) {
    string = toString(string);
    pattern = guard ? undefined : pattern;

    if (pattern === undefined) {
      pattern = reHasComplexWord.test(string) ? reComplexWord : reBasicWord;
    }
    return string.match(pattern) || [];
  }

  /*------------------------------------------------------------------------*/

  /**
   * Attempts to invoke `func`, returning either the result or the caught error
   * object. Any additional arguments are provided to `func` when it's invoked.
   *
   * @static
   * @memberOf _
   * @since 3.0.0
   * @category Util
   * @param {Function} func The function to attempt.
   * @param {...*} [args] The arguments to invoke `func` with.
   * @returns {*} Returns the `func` result or error object.
   * @example
   *
   * // Avoid throwing errors for invalid selectors.
   * var elements = _.attempt(function(selector) {
   *   return document.querySelectorAll(selector);
   * }, '>_>');
   *
   * if (_.isError(elements)) {
   *   elements = [];
   * }
   */
  var attempt = rest(function(func, args) {
    try {
      return apply(func, undefined, args);
    } catch (e) {
      return isError(e) ? e : new Error(e);
    }
  });

  /**
   * Binds methods of an object to the object itself, overwriting the existing
   * method.
   *
   * **Note:** This method doesn't set the "length" property of bound functions.
   *
   * @static
   * @since 0.1.0
   * @memberOf _
   * @category Util
   * @param {Object} object The object to bind and assign the bound methods to.
   * @param {...(string|string[])} methodNames The object method names to bind.
   * @returns {Object} Returns `object`.
   * @example
   *
   * var view = {
   *   'label': 'docs',
   *   'onClick': function() {
   *     console.log('clicked ' + this.label);
   *   }
   * };
   *
   * _.bindAll(view, ['onClick']);
   * jQuery(element).on('click', view.onClick);
   * // => Logs 'clicked docs' when clicked.
   */
  var bindAll = rest(function(object, methodNames) {
    arrayEach(baseFlatten(methodNames, 1), function(key) {
      key = toKey(key);
      object[key] = bind(object[key], object);
    });
    return object;
  });

  /**
   * Creates a function that iterates over `pairs` and invokes the corresponding
   * function of the first predicate to return truthy. The predicate-function
   * pairs are invoked with the `this` binding and arguments of the created
   * function.
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category Util
   * @param {Array} pairs The predicate-function pairs.
   * @returns {Function} Returns the new composite function.
   * @example
   *
   * var func = _.cond([
   *   [_.matches({ 'a': 1 }),           _.constant('matches A')],
   *   [_.conforms({ 'b': _.isNumber }), _.constant('matches B')],
   *   [_.constant(true),                _.constant('no match')]
   * ]);
   *
   * func({ 'a': 1, 'b': 2 });
   * // => 'matches A'
   *
   * func({ 'a': 0, 'b': 1 });
   * // => 'matches B'
   *
   * func({ 'a': '1', 'b': '2' });
   * // => 'no match'
   */
  function cond(pairs) {
    var length = pairs ? pairs.length : 0,
        toIteratee = getIteratee();

    pairs = !length ? [] : arrayMap(pairs, function(pair) {
      if (typeof pair[1] != 'function') {
        throw new TypeError(FUNC_ERROR_TEXT);
      }
      return [toIteratee(pair[0]), pair[1]];
    });

    return rest(function(args) {
      var index = -1;
      while (++index < length) {
        var pair = pairs[index];
        if (apply(pair[0], this, args)) {
          return apply(pair[1], this, args);
        }
      }
    });
  }

  /**
   * Creates a function that invokes the predicate properties of `source` with
   * the corresponding property values of a given object, returning `true` if
   * all predicates return truthy, else `false`.
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category Util
   * @param {Object} source The object of property predicates to conform to.
   * @returns {Function} Returns the new spec function.
   * @example
   *
   * var users = [
   *   { 'user': 'barney', 'age': 36 },
   *   { 'user': 'fred',   'age': 40 }
   * ];
   *
   * _.filter(users, _.conforms({ 'age': function(n) { return n > 38; } }));
   * // => [{ 'user': 'fred', 'age': 40 }]
   */
  function conforms(source) {
    return baseConforms(baseClone(source, true));
  }

  /**
   * Creates a function that returns `value`.
   *
   * @static
   * @memberOf _
   * @since 2.4.0
   * @category Util
   * @param {*} value The value to return from the new function.
   * @returns {Function} Returns the new constant function.
   * @example
   *
   * var objects = _.times(2, _.constant({ 'a': 1 }));
   *
   * console.log(objects);
   * // => [{ 'a': 1 }, { 'a': 1 }]
   *
   * console.log(objects[0] === objects[1]);
   * // => true
   */
  function constant(value) {
    return function() {
      return value;
    };
  }

  /**
   * Creates a function that returns the result of invoking the given functions
   * with the `this` binding of the created function, where each successive
   * invocation is supplied the return value of the previous.
   *
   * @static
   * @memberOf _
   * @since 3.0.0
   * @category Util
   * @param {...(Function|Function[])} [funcs] Functions to invoke.
   * @returns {Function} Returns the new composite function.
   * @see _.flowRight
   * @example
   *
   * function square(n) {
   *   return n * n;
   * }
   *
   * var addSquare = _.flow([_.add, square]);
   * addSquare(1, 2);
   * // => 9
   */
  var flow = createFlow();

  /**
   * This method is like `_.flow` except that it creates a function that
   * invokes the given functions from right to left.
   *
   * @static
   * @since 3.0.0
   * @memberOf _
   * @category Util
   * @param {...(Function|Function[])} [funcs] Functions to invoke.
   * @returns {Function} Returns the new composite function.
   * @see _.flow
   * @example
   *
   * function square(n) {
   *   return n * n;
   * }
   *
   * var addSquare = _.flowRight([square, _.add]);
   * addSquare(1, 2);
   * // => 9
   */
  var flowRight = createFlow(true);

  /**
   * This method returns the first argument given to it.
   *
   * @static
   * @since 0.1.0
   * @memberOf _
   * @category Util
   * @param {*} value Any value.
   * @returns {*} Returns `value`.
   * @example
   *
   * var object = { 'user': 'fred' };
   *
   * console.log(_.identity(object) === object);
   * // => true
   */
  function identity(value) {
    return value;
  }

  /**
   * Creates a function that invokes `func` with the arguments of the created
   * function. If `func` is a property name, the created function returns the
   * property value for a given element. If `func` is an array or object, the
   * created function returns `true` for elements that contain the equivalent
   * source properties, otherwise it returns `false`.
   *
   * @static
   * @since 4.0.0
   * @memberOf _
   * @category Util
   * @param {*} [func=_.identity] The value to convert to a callback.
   * @returns {Function} Returns the callback.
   * @example
   *
   * var users = [
   *   { 'user': 'barney', 'age': 36, 'active': true },
   *   { 'user': 'fred',   'age': 40, 'active': false }
   * ];
   *
   * // The `_.matches` iteratee shorthand.
   * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true }));
   * // => [{ 'user': 'barney', 'age': 36, 'active': true }]
   *
   * // The `_.matchesProperty` iteratee shorthand.
   * _.filter(users, _.iteratee(['user', 'fred']));
   * // => [{ 'user': 'fred', 'age': 40 }]
   *
   * // The `_.property` iteratee shorthand.
   * _.map(users, _.iteratee('user'));
   * // => ['barney', 'fred']
   *
   * // Create custom iteratee shorthands.
   * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) {
   *   return !_.isRegExp(func) ? iteratee(func) : function(string) {
   *     return func.test(string);
   *   };
   * });
   *
   * _.filter(['abc', 'def'], /ef/);
   * // => ['def']
   */
  function iteratee(func) {
    return baseIteratee(typeof func == 'function' ? func : baseClone(func, true));
  }

  /**
   * Creates a function that performs a partial deep comparison between a given
   * object and `source`, returning `true` if the given object has equivalent
   * property values, else `false`. The created function is equivalent to
   * `_.isMatch` with a `source` partially applied.
   *
   * **Note:** This method supports comparing the same values as `_.isEqual`.
   *
   * @static
   * @memberOf _
   * @since 3.0.0
   * @category Util
   * @param {Object} source The object of property values to match.
   * @returns {Function} Returns the new spec function.
   * @example
   *
   * var users = [
   *   { 'user': 'barney', 'age': 36, 'active': true },
   *   { 'user': 'fred',   'age': 40, 'active': false }
   * ];
   *
   * _.filter(users, _.matches({ 'age': 40, 'active': false }));
   * // => [{ 'user': 'fred', 'age': 40, 'active': false }]
   */
  function matches(source) {
    return baseMatches(baseClone(source, true));
  }

  /**
   * Creates a function that performs a partial deep comparison between the
   * value at `path` of a given object to `srcValue`, returning `true` if the
   * object value is equivalent, else `false`.
   *
   * **Note:** This method supports comparing the same values as `_.isEqual`.
   *
   * @static
   * @memberOf _
   * @since 3.2.0
   * @category Util
   * @param {Array|string} path The path of the property to get.
   * @param {*} srcValue The value to match.
   * @returns {Function} Returns the new spec function.
   * @example
   *
   * var users = [
   *   { 'user': 'barney' },
   *   { 'user': 'fred' }
   * ];
   *
   * _.find(users, _.matchesProperty('user', 'fred'));
   * // => { 'user': 'fred' }
   */
  function matchesProperty(path, srcValue) {
    return baseMatchesProperty(path, baseClone(srcValue, true));
  }

  /**
   * Creates a function that invokes the method at `path` of a given object.
   * Any additional arguments are provided to the invoked method.
   *
   * @static
   * @memberOf _
   * @since 3.7.0
   * @category Util
   * @param {Array|string} path The path of the method to invoke.
   * @param {...*} [args] The arguments to invoke the method with.
   * @returns {Function} Returns the new invoker function.
   * @example
   *
   * var objects = [
   *   { 'a': { 'b': _.constant(2) } },
   *   { 'a': { 'b': _.constant(1) } }
   * ];
   *
   * _.map(objects, _.method('a.b'));
   * // => [2, 1]
   *
   * _.map(objects, _.method(['a', 'b']));
   * // => [2, 1]
   */
  var method = rest(function(path, args) {
    return function(object) {
      return baseInvoke(object, path, args);
    };
  });

  /**
   * The opposite of `_.method`; this method creates a function that invokes
   * the method at a given path of `object`. Any additional arguments are
   * provided to the invoked method.
   *
   * @static
   * @memberOf _
   * @since 3.7.0
   * @category Util
   * @param {Object} object The object to query.
   * @param {...*} [args] The arguments to invoke the method with.
   * @returns {Function} Returns the new invoker function.
   * @example
   *
   * var array = _.times(3, _.constant),
   *     object = { 'a': array, 'b': array, 'c': array };
   *
   * _.map(['a[2]', 'c[0]'], _.methodOf(object));
   * // => [2, 0]
   *
   * _.map([['a', '2'], ['c', '0']], _.methodOf(object));
   * // => [2, 0]
   */
  var methodOf = rest(function(object, args) {
    return function(path) {
      return baseInvoke(object, path, args);
    };
  });

  /**
   * Adds all own enumerable string keyed function properties of a source
   * object to the destination object. If `object` is a function, then methods
   * are added to its prototype as well.
   *
   * **Note:** Use `_.runInContext` to create a pristine `lodash` function to
   * avoid conflicts caused by modifying the original.
   *
   * @static
   * @since 0.1.0
   * @memberOf _
   * @category Util
   * @param {Function|Object} [object=lodash] The destination object.
   * @param {Object} source The object of functions to add.
   * @param {Object} [options={}] The options object.
   * @param {boolean} [options.chain=true] Specify whether mixins are chainable.
   * @returns {Function|Object} Returns `object`.
   * @example
   *
   * function vowels(string) {
   *   return _.filter(string, function(v) {
   *     return /[aeiou]/i.test(v);
   *   });
   * }
   *
   * _.mixin({ 'vowels': vowels });
   * _.vowels('fred');
   * // => ['e']
   *
   * _('fred').vowels().value();
   * // => ['e']
   *
   * _.mixin({ 'vowels': vowels }, { 'chain': false });
   * _('fred').vowels();
   * // => ['e']
   */
  function mixin(object, source, options) {
    var props = keys(source),
        methodNames = baseFunctions(source, props);

    if (options == null &&
        !(isObject(source) && (methodNames.length || !props.length))) {
      options = source;
      source = object;
      object = this;
      methodNames = baseFunctions(source, keys(source));
    }
    var chain = !(isObject(options) && 'chain' in options) || !!options.chain,
        isFunc = isFunction(object);

    arrayEach(methodNames, function(methodName) {
      var func = source[methodName];
      object[methodName] = func;
      if (isFunc) {
        object.prototype[methodName] = function() {
          var chainAll = this.__chain__;
          if (chain || chainAll) {
            var result = object(this.__wrapped__),
                actions = result.__actions__ = copyArray(this.__actions__);

            actions.push({ 'func': func, 'args': arguments, 'thisArg': object });
            result.__chain__ = chainAll;
            return result;
          }
          return func.apply(object, arrayPush([this.value()], arguments));
        };
      }
    });

    return object;
  }

  /**
   * Reverts the `_` variable to its previous value and returns a reference to
   * the `lodash` function.
   *
   * @static
   * @since 0.1.0
   * @memberOf _
   * @category Util
   * @returns {Function} Returns the `lodash` function.
   * @example
   *
   * var lodash = _.noConflict();
   */
  function noConflict() {
    if (root._ === this) {
      root._ = oldDash;
    }
    return this;
  }

  /**
   * A method that returns `undefined`.
   *
   * @static
   * @memberOf _
   * @since 2.3.0
   * @category Util
   * @example
   *
   * _.times(2, _.noop);
   * // => [undefined, undefined]
   */
  function noop() {
    // No operation performed.
  }

  /**
   * Creates a function that gets the argument at index `n`. If `n` is negative,
   * the nth argument from the end is returned.
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category Util
   * @param {number} [n=0] The index of the argument to return.
   * @returns {Function} Returns the new pass-thru function.
   * @example
   *
   * var func = _.nthArg(1);
   * func('a', 'b', 'c', 'd');
   * // => 'b'
   *
   * var func = _.nthArg(-2);
   * func('a', 'b', 'c', 'd');
   * // => 'c'
   */
  function nthArg(n) {
    n = toInteger(n);
    return rest(function(args) {
      return baseNth(args, n);
    });
  }

  /**
   * Creates a function that invokes `iteratees` with the arguments it receives
   * and returns their results.
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category Util
   * @param {...(Array|Array[]|Function|Function[]|Object|Object[]|string|string[])}
   *  [iteratees=[_.identity]] The iteratees to invoke.
   * @returns {Function} Returns the new function.
   * @example
   *
   * var func = _.over([Math.max, Math.min]);
   *
   * func(1, 2, 3, 4);
   * // => [4, 1]
   */
  var over = createOver(arrayMap);

  /**
   * Creates a function that checks if **all** of the `predicates` return
   * truthy when invoked with the arguments it receives.
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category Util
   * @param {...(Array|Array[]|Function|Function[]|Object|Object[]|string|string[])}
   *  [predicates=[_.identity]] The predicates to check.
   * @returns {Function} Returns the new function.
   * @example
   *
   * var func = _.overEvery([Boolean, isFinite]);
   *
   * func('1');
   * // => true
   *
   * func(null);
   * // => false
   *
   * func(NaN);
   * // => false
   */
  var overEvery = createOver(arrayEvery);

  /**
   * Creates a function that checks if **any** of the `predicates` return
   * truthy when invoked with the arguments it receives.
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category Util
   * @param {...(Array|Array[]|Function|Function[]|Object|Object[]|string|string[])}
   *  [predicates=[_.identity]] The predicates to check.
   * @returns {Function} Returns the new function.
   * @example
   *
   * var func = _.overSome([Boolean, isFinite]);
   *
   * func('1');
   * // => true
   *
   * func(null);
   * // => true
   *
   * func(NaN);
   * // => false
   */
  var overSome = createOver(arraySome);

  /**
   * 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);
  }

  /**
   * The opposite of `_.property`; this method creates a function that returns
   * the value at a given path of `object`.
   *
   * @static
   * @memberOf _
   * @since 3.0.0
   * @category Util
   * @param {Object} object The object to query.
   * @returns {Function} Returns the new accessor function.
   * @example
   *
   * var array = [0, 1, 2],
   *     object = { 'a': array, 'b': array, 'c': array };
   *
   * _.map(['a[2]', 'c[0]'], _.propertyOf(object));
   * // => [2, 0]
   *
   * _.map([['a', '2'], ['c', '0']], _.propertyOf(object));
   * // => [2, 0]
   */
  function propertyOf(object) {
    return function(path) {
      return object == null ? undefined : baseGet(object, path);
    };
  }

  /**
   * Creates an array of numbers (positive and/or negative) progressing from
   * `start` up to, but not including, `end`. A step of `-1` is used if a negative
   * `start` is specified without an `end` or `step`. If `end` is not specified,
   * it's set to `start` with `start` then set to `0`.
   *
   * **Note:** JavaScript follows the IEEE-754 standard for resolving
   * floating-point values which can produce unexpected results.
   *
   * @static
   * @since 0.1.0
   * @memberOf _
   * @category Util
   * @param {number} [start=0] The start of the range.
   * @param {number} end The end of the range.
   * @param {number} [step=1] The value to increment or decrement by.
   * @returns {Array} Returns the range of numbers.
   * @see _.inRange, _.rangeRight
   * @example
   *
   * _.range(4);
   * // => [0, 1, 2, 3]
   *
   * _.range(-4);
   * // => [0, -1, -2, -3]
   *
   * _.range(1, 5);
   * // => [1, 2, 3, 4]
   *
   * _.range(0, 20, 5);
   * // => [0, 5, 10, 15]
   *
   * _.range(0, -4, -1);
   * // => [0, -1, -2, -3]
   *
   * _.range(1, 4, 0);
   * // => [1, 1, 1]
   *
   * _.range(0);
   * // => []
   */
  var range = createRange();

  /**
   * This method is like `_.range` except that it populates values in
   * descending order.
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category Util
   * @param {number} [start=0] The start of the range.
   * @param {number} end The end of the range.
   * @param {number} [step=1] The value to increment or decrement by.
   * @returns {Array} Returns the range of numbers.
   * @see _.inRange, _.range
   * @example
   *
   * _.rangeRight(4);
   * // => [3, 2, 1, 0]
   *
   * _.rangeRight(-4);
   * // => [-3, -2, -1, 0]
   *
   * _.rangeRight(1, 5);
   * // => [4, 3, 2, 1]
   *
   * _.rangeRight(0, 20, 5);
   * // => [15, 10, 5, 0]
   *
   * _.rangeRight(0, -4, -1);
   * // => [-3, -2, -1, 0]
   *
   * _.rangeRight(1, 4, 0);
   * // => [1, 1, 1]
   *
   * _.rangeRight(0);
   * // => []
   */
  var rangeRight = createRange(true);

  /**
   * A method that returns a new empty array.
   *
   * @static
   * @memberOf _
   * @since 4.13.0
   * @category Util
   * @returns {Array} Returns the new empty array.
   * @example
   *
   * var arrays = _.times(2, _.stubArray);
   *
   * console.log(arrays);
   * // => [[], []]
   *
   * console.log(arrays[0] === arrays[1]);
   * // => false
   */
  function stubArray() {
    return [];
  }

  /**
   * A method that returns `false`.
   *
   * @static
   * @memberOf _
   * @since 4.13.0
   * @category Util
   * @returns {boolean} Returns `false`.
   * @example
   *
   * _.times(2, _.stubFalse);
   * // => [false, false]
   */
  function stubFalse() {
    return false;
  }

  /**
   * A method that returns a new empty object.
   *
   * @static
   * @memberOf _
   * @since 4.13.0
   * @category Util
   * @returns {Object} Returns the new empty object.
   * @example
   *
   * var objects = _.times(2, _.stubObject);
   *
   * console.log(objects);
   * // => [{}, {}]
   *
   * console.log(objects[0] === objects[1]);
   * // => false
   */
  function stubObject() {
    return {};
  }

  /**
   * A method that returns an empty string.
   *
   * @static
   * @memberOf _
   * @since 4.13.0
   * @category Util
   * @returns {string} Returns the empty string.
   * @example
   *
   * _.times(2, _.stubString);
   * // => ['', '']
   */
  function stubString() {
    return '';
  }

  /**
   * A method that returns `true`.
   *
   * @static
   * @memberOf _
   * @since 4.13.0
   * @category Util
   * @returns {boolean} Returns `true`.
   * @example
   *
   * _.times(2, _.stubTrue);
   * // => [true, true]
   */
  function stubTrue() {
    return true;
  }

  /**
   * Invokes the iteratee `n` times, returning an array of the results of
   * each invocation. The iteratee is invoked with one argument; (index).
   *
   * @static
   * @since 0.1.0
   * @memberOf _
   * @category Util
   * @param {number} n The number of times to invoke `iteratee`.
   * @param {Function} [iteratee=_.identity] The function invoked per iteration.
   * @returns {Array} Returns the array of results.
   * @example
   *
   * _.times(3, String);
   * // => ['0', '1', '2']
   *
   *  _.times(4, _.constant(0));
   * // => [0, 0, 0, 0]
   */
  function times(n, iteratee) {
    n = toInteger(n);
    if (n < 1 || n > MAX_SAFE_INTEGER) {
      return [];
    }
    var index = MAX_ARRAY_LENGTH,
        length = nativeMin(n, MAX_ARRAY_LENGTH);

    iteratee = getIteratee(iteratee);
    n -= MAX_ARRAY_LENGTH;

    var result = baseTimes(length, iteratee);
    while (++index < n) {
      iteratee(index);
    }
    return result;
  }

  /**
   * Converts `value` to a property path array.
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category Util
   * @param {*} value The value to convert.
   * @returns {Array} Returns the new property path array.
   * @example
   *
   * _.toPath('a.b.c');
   * // => ['a', 'b', 'c']
   *
   * _.toPath('a[0].b.c');
   * // => ['a', '0', 'b', 'c']
   */
  function toPath(value) {
    if (isArray(value)) {
      return arrayMap(value, toKey);
    }
    return isSymbol(value) ? [value] : copyArray(stringToPath(value));
  }

  /**
   * Generates a unique ID. If `prefix` is given, the ID is appended to it.
   *
   * @static
   * @since 0.1.0
   * @memberOf _
   * @category Util
   * @param {string} [prefix=''] The value to prefix the ID with.
   * @returns {string} Returns the unique ID.
   * @example
   *
   * _.uniqueId('contact_');
   * // => 'contact_104'
   *
   * _.uniqueId();
   * // => '105'
   */
  function uniqueId(prefix) {
    var id = ++idCounter;
    return toString(prefix) + id;
  }

  /*------------------------------------------------------------------------*/

  /**
   * Adds two numbers.
   *
   * @static
   * @memberOf _
   * @since 3.4.0
   * @category Math
   * @param {number} augend The first number in an addition.
   * @param {number} addend The second number in an addition.
   * @returns {number} Returns the total.
   * @example
   *
   * _.add(6, 4);
   * // => 10
   */
  var add = createMathOperation(function(augend, addend) {
    return augend + addend;
  });

  /**
   * Computes `number` rounded up to `precision`.
   *
   * @static
   * @memberOf _
   * @since 3.10.0
   * @category Math
   * @param {number} number The number to round up.
   * @param {number} [precision=0] The precision to round up to.
   * @returns {number} Returns the rounded up number.
   * @example
   *
   * _.ceil(4.006);
   * // => 5
   *
   * _.ceil(6.004, 2);
   * // => 6.01
   *
   * _.ceil(6040, -2);
   * // => 6100
   */
  var ceil = createRound('ceil');

  /**
   * Divide two numbers.
   *
   * @static
   * @memberOf _
   * @since 4.7.0
   * @category Math
   * @param {number} dividend The first number in a division.
   * @param {number} divisor The second number in a division.
   * @returns {number} Returns the quotient.
   * @example
   *
   * _.divide(6, 4);
   * // => 1.5
   */
  var divide = createMathOperation(function(dividend, divisor) {
    return dividend / divisor;
  });

  /**
   * Computes `number` rounded down to `precision`.
   *
   * @static
   * @memberOf _
   * @since 3.10.0
   * @category Math
   * @param {number} number The number to round down.
   * @param {number} [precision=0] The precision to round down to.
   * @returns {number} Returns the rounded down number.
   * @example
   *
   * _.floor(4.006);
   * // => 4
   *
   * _.floor(0.046, 2);
   * // => 0.04
   *
   * _.floor(4060, -2);
   * // => 4000
   */
  var floor = createRound('floor');

  /**
   * Computes the maximum value of `array`. If `array` is empty or falsey,
   * `undefined` is returned.
   *
   * @static
   * @since 0.1.0
   * @memberOf _
   * @category Math
   * @param {Array} array The array to iterate over.
   * @returns {*} Returns the maximum value.
   * @example
   *
   * _.max([4, 2, 8, 6]);
   * // => 8
   *
   * _.max([]);
   * // => undefined
   */
  function max(array) {
    return (array && array.length)
      ? baseExtremum(array, identity, baseGt)
      : undefined;
  }

  /**
   * This method is like `_.max` except that it accepts `iteratee` which is
   * invoked for each element in `array` to generate the criterion by which
   * the value is ranked. The iteratee is invoked with one argument: (value).
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category Math
   * @param {Array} array The array to iterate over.
   * @param {Array|Function|Object|string} [iteratee=_.identity]
   *  The iteratee invoked per element.
   * @returns {*} Returns the maximum value.
   * @example
   *
   * var objects = [{ 'n': 1 }, { 'n': 2 }];
   *
   * _.maxBy(objects, function(o) { return o.n; });
   * // => { 'n': 2 }
   *
   * // The `_.property` iteratee shorthand.
   * _.maxBy(objects, 'n');
   * // => { 'n': 2 }
   */
  function maxBy(array, iteratee) {
    return (array && array.length)
      ? baseExtremum(array, getIteratee(iteratee), baseGt)
      : undefined;
  }

  /**
   * Computes the mean of the values in `array`.
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category Math
   * @param {Array} array The array to iterate over.
   * @returns {number} Returns the mean.
   * @example
   *
   * _.mean([4, 2, 8, 6]);
   * // => 5
   */
  function mean(array) {
    return baseMean(array, identity);
  }

  /**
   * This method is like `_.mean` except that it accepts `iteratee` which is
   * invoked for each element in `array` to generate the value to be averaged.
   * The iteratee is invoked with one argument: (value).
   *
   * @static
   * @memberOf _
   * @since 4.7.0
   * @category Math
   * @param {Array} array The array to iterate over.
   * @param {Array|Function|Object|string} [iteratee=_.identity]
   *  The iteratee invoked per element.
   * @returns {number} Returns the mean.
   * @example
   *
   * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
   *
   * _.meanBy(objects, function(o) { return o.n; });
   * // => 5
   *
   * // The `_.property` iteratee shorthand.
   * _.meanBy(objects, 'n');
   * // => 5
   */
  function meanBy(array, iteratee) {
    return baseMean(array, getIteratee(iteratee));
  }

  /**
   * Computes the minimum value of `array`. If `array` is empty or falsey,
   * `undefined` is returned.
   *
   * @static
   * @since 0.1.0
   * @memberOf _
   * @category Math
   * @param {Array} array The array to iterate over.
   * @returns {*} Returns the minimum value.
   * @example
   *
   * _.min([4, 2, 8, 6]);
   * // => 2
   *
   * _.min([]);
   * // => undefined
   */
  function min(array) {
    return (array && array.length)
      ? baseExtremum(array, identity, baseLt)
      : undefined;
  }

  /**
   * This method is like `_.min` except that it accepts `iteratee` which is
   * invoked for each element in `array` to generate the criterion by which
   * the value is ranked. The iteratee is invoked with one argument: (value).
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category Math
   * @param {Array} array The array to iterate over.
   * @param {Array|Function|Object|string} [iteratee=_.identity]
   *  The iteratee invoked per element.
   * @returns {*} Returns the minimum value.
   * @example
   *
   * var objects = [{ 'n': 1 }, { 'n': 2 }];
   *
   * _.minBy(objects, function(o) { return o.n; });
   * // => { 'n': 1 }
   *
   * // The `_.property` iteratee shorthand.
   * _.minBy(objects, 'n');
   * // => { 'n': 1 }
   */
  function minBy(array, iteratee) {
    return (array && array.length)
      ? baseExtremum(array, getIteratee(iteratee), baseLt)
      : undefined;
  }

  /**
   * Multiply two numbers.
   *
   * @static
   * @memberOf _
   * @since 4.7.0
   * @category Math
   * @param {number} multiplier The first number in a multiplication.
   * @param {number} multiplicand The second number in a multiplication.
   * @returns {number} Returns the product.
   * @example
   *
   * _.multiply(6, 4);
   * // => 24
   */
  var multiply = createMathOperation(function(multiplier, multiplicand) {
    return multiplier * multiplicand;
  });

  /**
   * Computes `number` rounded to `precision`.
   *
   * @static
   * @memberOf _
   * @since 3.10.0
   * @category Math
   * @param {number} number The number to round.
   * @param {number} [precision=0] The precision to round to.
   * @returns {number} Returns the rounded number.
   * @example
   *
   * _.round(4.006);
   * // => 4
   *
   * _.round(4.006, 2);
   * // => 4.01
   *
   * _.round(4060, -2);
   * // => 4100
   */
  var round = createRound('round');

  /**
   * Subtract two numbers.
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category Math
   * @param {number} minuend The first number in a subtraction.
   * @param {number} subtrahend The second number in a subtraction.
   * @returns {number} Returns the difference.
   * @example
   *
   * _.subtract(6, 4);
   * // => 2
   */
  var subtract = createMathOperation(function(minuend, subtrahend) {
    return minuend - subtrahend;
  });

  /**
   * Computes the sum of the values in `array`.
   *
   * @static
   * @memberOf _
   * @since 3.4.0
   * @category Math
   * @param {Array} array The array to iterate over.
   * @returns {number} Returns the sum.
   * @example
   *
   * _.sum([4, 2, 8, 6]);
   * // => 20
   */
  function sum(array) {
    return (array && array.length)
      ? baseSum(array, identity)
      : 0;
  }

  /**
   * This method is like `_.sum` except that it accepts `iteratee` which is
   * invoked for each element in `array` to generate the value to be summed.
   * The iteratee is invoked with one argument: (value).
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category Math
   * @param {Array} array The array to iterate over.
   * @param {Array|Function|Object|string} [iteratee=_.identity]
   *  The iteratee invoked per element.
   * @returns {number} Returns the sum.
   * @example
   *
   * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
   *
   * _.sumBy(objects, function(o) { return o.n; });
   * // => 20
   *
   * // The `_.property` iteratee shorthand.
   * _.sumBy(objects, 'n');
   * // => 20
   */
  function sumBy(array, iteratee) {
    return (array && array.length)
      ? baseSum(array, getIteratee(iteratee))
      : 0;
  }

  /*------------------------------------------------------------------------*/

  // Add methods that return wrapped values in chain sequences.
  lodash.after = after;
  lodash.ary = ary;
  lodash.assign = assign;
  lodash.assignIn = assignIn;
  lodash.assignInWith = assignInWith;
  lodash.assignWith = assignWith;
  lodash.at = at;
  lodash.before = before;
  lodash.bind = bind;
  lodash.bindAll = bindAll;
  lodash.bindKey = bindKey;
  lodash.castArray = castArray;
  lodash.chain = chain;
  lodash.chunk = chunk;
  lodash.compact = compact;
  lodash.concat = concat;
  lodash.cond = cond;
  lodash.conforms = conforms;
  lodash.constant = constant;
  lodash.countBy = countBy;
  lodash.create = create;
  lodash.curry = curry;
  lodash.curryRight = curryRight;
  lodash.debounce = debounce;
  lodash.defaults = defaults;
  lodash.defaultsDeep = defaultsDeep;
  lodash.defer = defer;
  lodash.delay = delay;
  lodash.difference = difference;
  lodash.differenceBy = differenceBy;
  lodash.differenceWith = differenceWith;
  lodash.drop = drop;
  lodash.dropRight = dropRight;
  lodash.dropRightWhile = dropRightWhile;
  lodash.dropWhile = dropWhile;
  lodash.fill = fill;
  lodash.filter = filter;
  lodash.flatMap = flatMap;
  lodash.flatMapDeep = flatMapDeep;
  lodash.flatMapDepth = flatMapDepth;
  lodash.flatten = flatten;
  lodash.flattenDeep = flattenDeep;
  lodash.flattenDepth = flattenDepth;
  lodash.flip = flip;
  lodash.flow = flow;
  lodash.flowRight = flowRight;
  lodash.fromPairs = fromPairs;
  lodash.functions = functions;
  lodash.functionsIn = functionsIn;
  lodash.groupBy = groupBy;
  lodash.initial = initial;
  lodash.intersection = intersection;
  lodash.intersectionBy = intersectionBy;
  lodash.intersectionWith = intersectionWith;
  lodash.invert = invert;
  lodash.invertBy = invertBy;
  lodash.invokeMap = invokeMap;
  lodash.iteratee = iteratee;
  lodash.keyBy = keyBy;
  lodash.keys = keys;
  lodash.keysIn = keysIn;
  lodash.map = map;
  lodash.mapKeys = mapKeys;
  lodash.mapValues = mapValues;
  lodash.matches = matches;
  lodash.matchesProperty = matchesProperty;
  lodash.memoize = memoize;
  lodash.merge = merge;
  lodash.mergeWith = mergeWith;
  lodash.method = method;
  lodash.methodOf = methodOf;
  lodash.mixin = mixin;
  lodash.negate = negate;
  lodash.nthArg = nthArg;
  lodash.omit = omit;
  lodash.omitBy = omitBy;
  lodash.once = once;
  lodash.orderBy = orderBy;
  lodash.over = over;
  lodash.overArgs = overArgs;
  lodash.overEvery = overEvery;
  lodash.overSome = overSome;
  lodash.partial = partial;
  lodash.partialRight = partialRight;
  lodash.partition = partition;
  lodash.pick = pick;
  lodash.pickBy = pickBy;
  lodash.property = property;
  lodash.propertyOf = propertyOf;
  lodash.pull = pull;
  lodash.pullAll = pullAll;
  lodash.pullAllBy = pullAllBy;
  lodash.pullAllWith = pullAllWith;
  lodash.pullAt = pullAt;
  lodash.range = range;
  lodash.rangeRight = rangeRight;
  lodash.rearg = rearg;
  lodash.reject = reject;
  lodash.remove = remove;
  lodash.rest = rest;
  lodash.reverse = reverse;
  lodash.sampleSize = sampleSize;
  lodash.set = set;
  lodash.setWith = setWith;
  lodash.shuffle = shuffle;
  lodash.slice = slice;
  lodash.sortBy = sortBy;
  lodash.sortedUniq = sortedUniq;
  lodash.sortedUniqBy = sortedUniqBy;
  lodash.split = split;
  lodash.spread = spread;
  lodash.tail = tail;
  lodash.take = take;
  lodash.takeRight = takeRight;
  lodash.takeRightWhile = takeRightWhile;
  lodash.takeWhile = takeWhile;
  lodash.tap = tap;
  lodash.throttle = throttle;
  lodash.thru = thru;
  lodash.toArray = toArray;
  lodash.toPairs = toPairs;
  lodash.toPairsIn = toPairsIn;
  lodash.toPath = toPath;
  lodash.toPlainObject = toPlainObject;
  lodash.transform = transform;
  lodash.unary = unary;
  lodash.union = union;
  lodash.unionBy = unionBy;
  lodash.unionWith = unionWith;
  lodash.uniq = uniq;
  lodash.uniqBy = uniqBy;
  lodash.uniqWith = uniqWith;
  lodash.unset = unset;
  lodash.unzip = unzip;
  lodash.unzipWith = unzipWith;
  lodash.update = update;
  lodash.updateWith = updateWith;
  lodash.values = values;
  lodash.valuesIn = valuesIn;
  lodash.without = without;
  lodash.words = words;
  lodash.wrap = wrap;
  lodash.xor = xor;
  lodash.xorBy = xorBy;
  lodash.xorWith = xorWith;
  lodash.zip = zip;
  lodash.zipObject = zipObject;
  lodash.zipObjectDeep = zipObjectDeep;
  lodash.zipWith = zipWith;

  // Add aliases.
  lodash.entries = toPairs;
  lodash.entriesIn = toPairsIn;
  lodash.extend = assignIn;
  lodash.extendWith = assignInWith;

  // Add methods to `lodash.prototype`.
  mixin(lodash, lodash);

  /*------------------------------------------------------------------------*/

  // Add methods that return unwrapped values in chain sequences.
  lodash.add = add;
  lodash.attempt = attempt;
  lodash.camelCase = camelCase;
  lodash.capitalize = capitalize;
  lodash.ceil = ceil;
  lodash.clamp = clamp;
  lodash.clone = clone;
  lodash.cloneDeep = cloneDeep;
  lodash.cloneDeepWith = cloneDeepWith;
  lodash.cloneWith = cloneWith;
  lodash.deburr = deburr;
  lodash.divide = divide;
  lodash.endsWith = endsWith;
  lodash.eq = eq;
  lodash.escape = escape;
  lodash.escapeRegExp = escapeRegExp;
  lodash.every = every;
  lodash.find = find;
  lodash.findIndex = findIndex;
  lodash.findKey = findKey;
  lodash.findLast = findLast;
  lodash.findLastIndex = findLastIndex;
  lodash.findLastKey = findLastKey;
  lodash.floor = floor;
  lodash.forEach = forEach;
  lodash.forEachRight = forEachRight;
  lodash.forIn = forIn;
  lodash.forInRight = forInRight;
  lodash.forOwn = forOwn;
  lodash.forOwnRight = forOwnRight;
  lodash.get = get;
  lodash.gt = gt;
  lodash.gte = gte;
  lodash.has = has;
  lodash.hasIn = hasIn;
  lodash.head = head;
  lodash.identity = identity;
  lodash.includes = includes;
  lodash.indexOf = indexOf;
  lodash.inRange = inRange;
  lodash.invoke = invoke;
  lodash.isArguments = isArguments;
  lodash.isArray = isArray;
  lodash.isArrayBuffer = isArrayBuffer;
  lodash.isArrayLike = isArrayLike;
  lodash.isArrayLikeObject = isArrayLikeObject;
  lodash.isBoolean = isBoolean;
  lodash.isBuffer = isBuffer;
  lodash.isDate = isDate;
  lodash.isElement = isElement;
  lodash.isEmpty = isEmpty;
  lodash.isEqual = isEqual;
  lodash.isEqualWith = isEqualWith;
  lodash.isError = isError;
  lodash.isFinite = isFinite;
  lodash.isFunction = isFunction;
  lodash.isInteger = isInteger;
  lodash.isLength = isLength;
  lodash.isMap = isMap;
  lodash.isMatch = isMatch;
  lodash.isMatchWith = isMatchWith;
  lodash.isNaN = isNaN;
  lodash.isNative = isNative;
  lodash.isNil = isNil;
  lodash.isNull = isNull;
  lodash.isNumber = isNumber;
  lodash.isObject = isObject;
  lodash.isObjectLike = isObjectLike;
  lodash.isPlainObject = isPlainObject;
  lodash.isRegExp = isRegExp;
  lodash.isSafeInteger = isSafeInteger;
  lodash.isSet = isSet;
  lodash.isString = isString;
  lodash.isSymbol = isSymbol;
  lodash.isTypedArray = isTypedArray;
  lodash.isUndefined = isUndefined;
  lodash.isWeakMap = isWeakMap;
  lodash.isWeakSet = isWeakSet;
  lodash.join = join;
  lodash.kebabCase = kebabCase;
  lodash.last = last;
  lodash.lastIndexOf = lastIndexOf;
  lodash.lowerCase = lowerCase;
  lodash.lowerFirst = lowerFirst;
  lodash.lt = lt;
  lodash.lte = lte;
  lodash.max = max;
  lodash.maxBy = maxBy;
  lodash.mean = mean;
  lodash.meanBy = meanBy;
  lodash.min = min;
  lodash.minBy = minBy;
  lodash.stubArray = stubArray;
  lodash.stubFalse = stubFalse;
  lodash.stubObject = stubObject;
  lodash.stubString = stubString;
  lodash.stubTrue = stubTrue;
  lodash.multiply = multiply;
  lodash.nth = nth;
  lodash.noConflict = noConflict;
  lodash.noop = noop;
  lodash.now = now;
  lodash.pad = pad;
  lodash.padEnd = padEnd;
  lodash.padStart = padStart;
  lodash.parseInt = parseInt;
  lodash.random = random;
  lodash.reduce = reduce;
  lodash.reduceRight = reduceRight;
  lodash.repeat = repeat;
  lodash.replace = replace;
  lodash.result = result;
  lodash.round = round;
  lodash.runInContext = runInContext;
  lodash.sample = sample;
  lodash.size = size;
  lodash.snakeCase = snakeCase;
  lodash.some = some;
  lodash.sortedIndex = sortedIndex;
  lodash.sortedIndexBy = sortedIndexBy;
  lodash.sortedIndexOf = sortedIndexOf;
  lodash.sortedLastIndex = sortedLastIndex;
  lodash.sortedLastIndexBy = sortedLastIndexBy;
  lodash.sortedLastIndexOf = sortedLastIndexOf;
  lodash.startCase = startCase;
  lodash.startsWith = startsWith;
  lodash.subtract = subtract;
  lodash.sum = sum;
  lodash.sumBy = sumBy;
  lodash.template = template;
  lodash.times = times;
  lodash.toFinite = toFinite;
  lodash.toInteger = toInteger;
  lodash.toLength = toLength;
  lodash.toLower = toLower;
  lodash.toNumber = toNumber;
  lodash.toSafeInteger = toSafeInteger;
  lodash.toString = toString;
  lodash.toUpper = toUpper;
  lodash.trim = trim;
  lodash.trimEnd = trimEnd;
  lodash.trimStart = trimStart;
  lodash.truncate = truncate;
  lodash.unescape = unescape;
  lodash.uniqueId = uniqueId;
  lodash.upperCase = upperCase;
  lodash.upperFirst = upperFirst;

  // Add aliases.
  lodash.each = forEach;
  lodash.eachRight = forEachRight;
  lodash.first = head;

  mixin(lodash, (function() {
    var source = {};
    baseForOwn(lodash, function(func, methodName) {
      if (!hasOwnProperty.call(lodash.prototype, methodName)) {
        source[methodName] = func;
      }
    });
    return source;
  }()), { 'chain': false });

  /*------------------------------------------------------------------------*/

  /**
   * The semantic version number.
   *
   * @static
   * @memberOf _
   * @type {string}
   */
  lodash.VERSION = VERSION;

  // Assign default placeholders.
  arrayEach(['bind', 'bindKey', 'curry', 'curryRight', 'partial', 'partialRight'], function(methodName) {
    lodash[methodName].placeholder = lodash;
  });

  // Add `LazyWrapper` methods for `_.drop` and `_.take` variants.
  arrayEach(['drop', 'take'], function(methodName, index) {
    LazyWrapper.prototype[methodName] = function(n) {
      var filtered = this.__filtered__;
      if (filtered && !index) {
        return new LazyWrapper(this);
      }
      n = n === undefined ? 1 : nativeMax(toInteger(n), 0);

      var result = this.clone();
      if (filtered) {
        result.__takeCount__ = nativeMin(n, result.__takeCount__);
      } else {
        result.__views__.push({
          'size': nativeMin(n, MAX_ARRAY_LENGTH),
          'type': methodName + (result.__dir__ < 0 ? 'Right' : '')
        });
      }
      return result;
    };

    LazyWrapper.prototype[methodName + 'Right'] = function(n) {
      return this.reverse()[methodName](n).reverse();
    };
  });

  // Add `LazyWrapper` methods that accept an `iteratee` value.
  arrayEach(['filter', 'map', 'takeWhile'], function(methodName, index) {
    var type = index + 1,
        isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG;

    LazyWrapper.prototype[methodName] = function(iteratee) {
      var result = this.clone();
      result.__iteratees__.push({
        'iteratee': getIteratee(iteratee, 3),
        'type': type
      });
      result.__filtered__ = result.__filtered__ || isFilter;
      return result;
    };
  });

  // Add `LazyWrapper` methods for `_.head` and `_.last`.
  arrayEach(['head', 'last'], function(methodName, index) {
    var takeName = 'take' + (index ? 'Right' : '');

    LazyWrapper.prototype[methodName] = function() {
      return this[takeName](1).value()[0];
    };
  });

  // Add `LazyWrapper` methods for `_.initial` and `_.tail`.
  arrayEach(['initial', 'tail'], function(methodName, index) {
    var dropName = 'drop' + (index ? '' : 'Right');

    LazyWrapper.prototype[methodName] = function() {
      return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1);
    };
  });

  LazyWrapper.prototype.compact = function() {
    return this.filter(identity);
  };

  LazyWrapper.prototype.find = function(predicate) {
    return this.filter(predicate).head();
  };

  LazyWrapper.prototype.findLast = function(predicate) {
    return this.reverse().find(predicate);
  };

  LazyWrapper.prototype.invokeMap = rest(function(path, args) {
    if (typeof path == 'function') {
      return new LazyWrapper(this);
    }
    return this.map(function(value) {
      return baseInvoke(value, path, args);
    });
  });

  LazyWrapper.prototype.reject = function(predicate) {
    predicate = getIteratee(predicate, 3);
    return this.filter(function(value) {
      return !predicate(value);
    });
  };

  LazyWrapper.prototype.slice = function(start, end) {
    start = toInteger(start);

    var result = this;
    if (result.__filtered__ && (start > 0 || end < 0)) {
      return new LazyWrapper(result);
    }
    if (start < 0) {
      result = result.takeRight(-start);
    } else if (start) {
      result = result.drop(start);
    }
    if (end !== undefined) {
      end = toInteger(end);
      result = end < 0 ? result.dropRight(-end) : result.take(end - start);
    }
    return result;
  };

  LazyWrapper.prototype.takeRightWhile = function(predicate) {
    return this.reverse().takeWhile(predicate).reverse();
  };

  LazyWrapper.prototype.toArray = function() {
    return this.take(MAX_ARRAY_LENGTH);
  };

  // Add `LazyWrapper` methods to `lodash.prototype`.
  baseForOwn(LazyWrapper.prototype, function(func, methodName) {
    var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName),
        isTaker = /^(?:head|last)$/.test(methodName),
        lodashFunc = lodash[isTaker ? ('take' + (methodName == 'last' ? 'Right' : '')) : methodName],
        retUnwrapped = isTaker || /^find/.test(methodName);

    if (!lodashFunc) {
      return;
    }
    lodash.prototype[methodName] = function() {
      var value = this.__wrapped__,
          args = isTaker ? [1] : arguments,
          isLazy = value instanceof LazyWrapper,
          iteratee = args[0],
          useLazy = isLazy || isArray(value);

      var interceptor = function(value) {
        var result = lodashFunc.apply(lodash, arrayPush([value], args));
        return (isTaker && chainAll) ? result[0] : result;
      };

      if (useLazy && checkIteratee && typeof iteratee == 'function' && iteratee.length != 1) {
        // Avoid lazy use if the iteratee has a "length" value other than `1`.
        isLazy = useLazy = false;
      }
      var chainAll = this.__chain__,
          isHybrid = !!this.__actions__.length,
          isUnwrapped = retUnwrapped && !chainAll,
          onlyLazy = isLazy && !isHybrid;

      if (!retUnwrapped && useLazy) {
        value = onlyLazy ? value : new LazyWrapper(this);
        var result = func.apply(value, args);
        result.__actions__.push({ 'func': thru, 'args': [interceptor], 'thisArg': undefined });
        return new LodashWrapper(result, chainAll);
      }
      if (isUnwrapped && onlyLazy) {
        return func.apply(this, args);
      }
      result = this.thru(interceptor);
      return isUnwrapped ? (isTaker ? result.value()[0] : result.value()) : result;
    };
  });

  // Add `Array` methods to `lodash.prototype`.
  arrayEach(['pop', 'push', 'shift', 'sort', 'splice', 'unshift'], function(methodName) {
    var func = arrayProto[methodName],
        chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru',
        retUnwrapped = /^(?:pop|shift)$/.test(methodName);

    lodash.prototype[methodName] = function() {
      var args = arguments;
      if (retUnwrapped && !this.__chain__) {
        var value = this.value();
        return func.apply(isArray(value) ? value : [], args);
      }
      return this[chainName](function(value) {
        return func.apply(isArray(value) ? value : [], args);
      });
    };
  });

  // Map minified method names to their real names.
  baseForOwn(LazyWrapper.prototype, function(func, methodName) {
    var lodashFunc = lodash[methodName];
    if (lodashFunc) {
      var key = (lodashFunc.name + ''),
          names = realNames[key] || (realNames[key] = []);

      names.push({ 'name': methodName, 'func': lodashFunc });
    }
  });

  realNames[createHybridWrapper(undefined, BIND_KEY_FLAG).name] = [{
    'name': 'wrapper',
    'func': undefined
  }];

  // Add methods to `LazyWrapper`.
  LazyWrapper.prototype.clone = lazyClone;
  LazyWrapper.prototype.reverse = lazyReverse;
  LazyWrapper.prototype.value = lazyValue;

  // Add chain sequence methods to the `lodash` wrapper.
  lodash.prototype.at = wrapperAt;
  lodash.prototype.chain = wrapperChain;
  lodash.prototype.commit = wrapperCommit;
  lodash.prototype.next = wrapperNext;
  lodash.prototype.plant = wrapperPlant;
  lodash.prototype.reverse = wrapperReverse;
  lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue;

  if (iteratorSymbol) {
    lodash.prototype[iteratorSymbol] = wrapperToIterator;
  }
  return lodash;
}

/*--------------------------------------------------------------------------*/

// Export lodash.
var _ = runInContext();

// Expose Lodash on the free variable `window` or `self` when available so it's
// globally accessible, even when bundled with Browserify, Webpack, etc. This
// also prevents errors in cases where Lodash is loaded by a script tag in the
// presence of an AMD loader. See http://requirejs.org/docs/errors.html#mismatch
// for more details. Use `_.noConflict` to remove Lodash from the global object.
(freeSelf || {})._ = _;

// Some AMD build optimizers like r.js check for condition patterns like the following:
if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) {
  // Define as an anonymous module so, through path mapping, it can be
  // referenced as the "underscore" module.
  define(function() {
    return _;
  });
}
// Check for `exports` after `define` in case a build optimizer adds an `exports` object.
else if (freeModule) {
  // Export for Node.js.
  (freeModule.exports = _)._ = _;
  // Export for CommonJS support.
  freeExports._ = _;
}
else {
  // Export to the global object.
  root._ = _;
}

}.call(this));

}).call(this,typeof global !== “undefined” ? global : typeof self !== “undefined” ? self : typeof window !== “undefined” ? window : {}) },{}],109:[function(require,module,exports){ /**

* Helpers.
*/

var s = 1000; var m = s * 60; var h = m * 60; var d = h * 24; var y = d * 365.25;

/**

* Parse or format the given `val`.
*
* Options:
*
*  - `long` verbose formatting [false]
*
* @param {String|Number} val
* @param {Object} options
* @return {String|Number}
* @api public
*/

module.exports = function(val, options){

options = options || {};
if ('string' == typeof val) return parse(val);
return options.long
  ? long(val)
  : short(val);

};

/**

* Parse the given `str` and return milliseconds.
*
* @param {String} str
* @return {Number}
* @api private
*/

function parse(str) {

str = '' + str;
if (str.length > 10000) return;
var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(str);
if (!match) return;
var n = parseFloat(match[1]);
var type = (match[2] || 'ms').toLowerCase();
switch (type) {
  case 'years':
  case 'year':
  case 'yrs':
  case 'yr':
  case 'y':
    return n * y;
  case 'days':
  case 'day':
  case 'd':
    return n * d;
  case 'hours':
  case 'hour':
  case 'hrs':
  case 'hr':
  case 'h':
    return n * h;
  case 'minutes':
  case 'minute':
  case 'mins':
  case 'min':
  case 'm':
    return n * m;
  case 'seconds':
  case 'second':
  case 'secs':
  case 'sec':
  case 's':
    return n * s;
  case 'milliseconds':
  case 'millisecond':
  case 'msecs':
  case 'msec':
  case 'ms':
    return n;
}

}

/**

* Short format for `ms`.
*
* @param {Number} ms
* @return {String}
* @api private
*/

function short(ms) {

if (ms >= d) return Math.round(ms / d) + 'd';
if (ms >= h) return Math.round(ms / h) + 'h';
if (ms >= m) return Math.round(ms / m) + 'm';
if (ms >= s) return Math.round(ms / s) + 's';
return ms + 'ms';

}

/**

* Long format for `ms`.
*
* @param {Number} ms
* @return {String}
* @api private
*/

function long(ms) {

return plural(ms, d, 'day')
  || plural(ms, h, 'hour')
  || plural(ms, m, 'minute')
  || plural(ms, s, 'second')
  || ms + ' ms';

}

/**

* Pluralization helper.
*/

function plural(ms, n, name) {

if (ms < n) return;
if (ms < n * 1.5) return Math.floor(ms / n) + ' ' + name;
return Math.ceil(ms / n) + ' ' + name + 's';

}

},{}],110:[function(require,module,exports){ ‘use strict’; /* eslint-disable no-unused-vars */ var hasOwnProperty = Object.prototype.hasOwnProperty; var propIsEnumerable = Object.prototype.propertyIsEnumerable;

function toObject(val) {

if (val === null || val === undefined) {
        throw new TypeError('Object.assign cannot be called with null or undefined');
}

return Object(val);

}

function shouldUseNative() {

try {
        if (!Object.assign) {
                return false;
        }

        // Detect buggy property enumeration order in older V8 versions.

        // https://bugs.chromium.org/p/v8/issues/detail?id=4118
        var test1 = new String('abc');  // eslint-disable-line
        test1[5] = 'de';
        if (Object.getOwnPropertyNames(test1)[0] === '5') {
                return false;
        }

        // https://bugs.chromium.org/p/v8/issues/detail?id=3056
        var test2 = {};
        for (var i = 0; i < 10; i++) {
                test2['_' + String.fromCharCode(i)] = i;
        }
        var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
                return test2[n];
        });
        if (order2.join('') !== '0123456789') {
                return false;
        }

        // https://bugs.chromium.org/p/v8/issues/detail?id=3056
        var test3 = {};
        'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
                test3[letter] = letter;
        });
        if (Object.keys(Object.assign({}, test3)).join('') !==
                        'abcdefghijklmnopqrst') {
                return false;
        }

        return true;
} catch (e) {
        // We don't expect any of the above to throw, but better to be safe.
        return false;
}

}

module.exports = shouldUseNative() ? Object.assign : function (target, source) {

var from;
var to = toObject(target);
var symbols;

for (var s = 1; s < arguments.length; s++) {
        from = Object(arguments[s]);

        for (var key in from) {
                if (hasOwnProperty.call(from, key)) {
                        to[key] = from[key];
                }
        }

        if (Object.getOwnPropertySymbols) {
                symbols = Object.getOwnPropertySymbols(from);
                for (var i = 0; i < symbols.length; i++) {
                        if (propIsEnumerable.call(from, symbols[i])) {
                                to[symbols[i]] = from[symbols[i]];
                        }
                }
        }
}

return to;

};

},{}],111:[function(require,module,exports){ // Generated by LiveScript 1.4.0 var apply, curry, flip, fix, over, memoize, slice$ = [].slice, toString$ = {}.toString; apply = curry$(function(f, list){

return f.apply(null, list);

}); curry = function(f){

return curry$(f);

}; flip = curry$(function(f, x, y){

return f(y, x);

}); fix = function(f){

return function(g){
  return function(){
    return f(g(g)).apply(null, arguments);
  };
}(function(g){
  return function(){
    return f(g(g)).apply(null, arguments);
  };
});

}; over = curry$(function(f, g, x, y){

return f(g(x), g(y));

}); memoize = function(f){

var memo;
memo = {};
return function(){
  var args, key, arg;
  args = slice$.call(arguments);
  key = (function(){
    var i$, ref$, len$, results$ = [];
    for (i$ = 0, len$ = (ref$ = args).length; i$ < len$; ++i$) {
      arg = ref$[i$];
      results$.push(arg + toString$.call(arg).slice(8, -1));
    }
    return results$;
  }()).join('');
  return memo[key] = key in memo
    ? memo[key]
    : f.apply(null, args);
};

}; module.exports = {

curry: curry,
flip: flip,
fix: fix,
apply: apply,
over: over,
memoize: memoize

}; function curry$(f, bound){

var context,
_curry = function(args) {
  return f.length > 1 ? function(){
    var params = args ? args.concat() : [];
    context = bound ? context || this : this;
    return params.push.apply(params, arguments) <
        f.length && arguments.length ?
      _curry.call(context, params) : f.apply(context, params);
  } : f;
};
return _curry();

} },{}],112:[function(require,module,exports){ // Generated by LiveScript 1.4.0 var each, map, compact, filter, reject, partition, find, head, first, tail, last, initial, empty, reverse, unique, uniqueBy, fold, foldl, fold1, foldl1, foldr, foldr1, unfoldr, concat, concatMap, flatten, difference, intersection, union, countBy, groupBy, andList, orList, any, all, sort, sortWith, sortBy, sum, product, mean, average, maximum, minimum, maximumBy, minimumBy, scan, scanl, scan1, scanl1, scanr, scanr1, slice, take, drop, splitAt, takeWhile, dropWhile, span, breakList, zip, zipWith, zipAll, zipAllWith, at, elemIndex, elemIndices, findIndex, findIndices, toString$ = {}.toString, slice$ = [].slice; each = curry$(function(f, xs){

var i$, len$, x;
for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
  x = xs[i$];
  f(x);
}
return xs;

}); map = curry$(function(f, xs){

var i$, len$, x, results$ = [];
for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
  x = xs[i$];
  results$.push(f(x));
}
return results$;

}); compact = function(xs){

var i$, len$, x, results$ = [];
for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
  x = xs[i$];
  if (x) {
    results$.push(x);
  }
}
return results$;

}; filter = curry$(function(f, xs){

var i$, len$, x, results$ = [];
for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
  x = xs[i$];
  if (f(x)) {
    results$.push(x);
  }
}
return results$;

}); reject = curry$(function(f, xs){

var i$, len$, x, results$ = [];
for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
  x = xs[i$];
  if (!f(x)) {
    results$.push(x);
  }
}
return results$;

}); partition = curry$(function(f, xs){

var passed, failed, i$, len$, x;
passed = [];
failed = [];
for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
  x = xs[i$];
  (f(x) ? passed : failed).push(x);
}
return [passed, failed];

}); find = curry$(function(f, xs){

var i$, len$, x;
for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
  x = xs[i$];
  if (f(x)) {
    return x;
  }
}

}); head = first = function(xs){

return xs[0];

}; tail = function(xs){

if (!xs.length) {
  return;
}
return xs.slice(1);

}; last = function(xs){

return xs[xs.length - 1];

}; initial = function(xs){

if (!xs.length) {
  return;
}
return xs.slice(0, -1);

}; empty = function(xs){

return !xs.length;

}; reverse = function(xs){

return xs.concat().reverse();

}; unique = function(xs){

var result, i$, len$, x;
result = [];
for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
  x = xs[i$];
  if (!in$(x, result)) {
    result.push(x);
  }
}
return result;

}; uniqueBy = curry$(function(f, xs){

var seen, i$, len$, x, val, results$ = [];
seen = [];
for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
  x = xs[i$];
  val = f(x);
  if (in$(val, seen)) {
    continue;
  }
  seen.push(val);
  results$.push(x);
}
return results$;

}); fold = foldl = curry$(function(f, memo, xs){

var i$, len$, x;
for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
  x = xs[i$];
  memo = f(memo, x);
}
return memo;

}); fold1 = foldl1 = curry$(function(f, xs){

return fold(f, xs[0], xs.slice(1));

}); foldr = curry$(function(f, memo, xs){

var i$, x;
for (i$ = xs.length - 1; i$ >= 0; --i$) {
  x = xs[i$];
  memo = f(x, memo);
}
return memo;

}); foldr1 = curry$(function(f, xs){

return foldr(f, xs[xs.length - 1], xs.slice(0, -1));

}); unfoldr = curry$(function(f, b){

var result, x, that;
result = [];
x = b;
while ((that = f(x)) != null) {
  result.push(that[0]);
  x = that[1];
}
return result;

}); concat = function(xss){

return [].concat.apply([], xss);

}; concatMap = curry$(function(f, xs){

var x;
return [].concat.apply([], (function(){
  var i$, ref$, len$, results$ = [];
  for (i$ = 0, len$ = (ref$ = xs).length; i$ < len$; ++i$) {
    x = ref$[i$];
    results$.push(f(x));
  }
  return results$;
}()));

}); flatten = function(xs){

var x;
return [].concat.apply([], (function(){
  var i$, ref$, len$, results$ = [];
  for (i$ = 0, len$ = (ref$ = xs).length; i$ < len$; ++i$) {
    x = ref$[i$];
    if (toString$.call(x).slice(8, -1) === 'Array') {
      results$.push(flatten(x));
    } else {
      results$.push(x);
    }
  }
  return results$;
}()));

}; difference = function(xs){

var yss, results, i$, len$, x, j$, len1$, ys;
yss = slice$.call(arguments, 1);
results = [];
outer: for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
  x = xs[i$];
  for (j$ = 0, len1$ = yss.length; j$ < len1$; ++j$) {
    ys = yss[j$];
    if (in$(x, ys)) {
      continue outer;
    }
  }
  results.push(x);
}
return results;

}; intersection = function(xs){

var yss, results, i$, len$, x, j$, len1$, ys;
yss = slice$.call(arguments, 1);
results = [];
outer: for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
  x = xs[i$];
  for (j$ = 0, len1$ = yss.length; j$ < len1$; ++j$) {
    ys = yss[j$];
    if (!in$(x, ys)) {
      continue outer;
    }
  }
  results.push(x);
}
return results;

}; union = function(){

var xss, results, i$, len$, xs, j$, len1$, x;
xss = slice$.call(arguments);
results = [];
for (i$ = 0, len$ = xss.length; i$ < len$; ++i$) {
  xs = xss[i$];
  for (j$ = 0, len1$ = xs.length; j$ < len1$; ++j$) {
    x = xs[j$];
    if (!in$(x, results)) {
      results.push(x);
    }
  }
}
return results;

}; countBy = curry$(function(f, xs){

var results, i$, len$, x, key;
results = {};
for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
  x = xs[i$];
  key = f(x);
  if (key in results) {
    results[key] += 1;
  } else {
    results[key] = 1;
  }
}
return results;

}); groupBy = curry$(function(f, xs){

var results, i$, len$, x, key;
results = {};
for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
  x = xs[i$];
  key = f(x);
  if (key in results) {
    results[key].push(x);
  } else {
    results[key] = [x];
  }
}
return results;

}); andList = function(xs){

var i$, len$, x;
for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
  x = xs[i$];
  if (!x) {
    return false;
  }
}
return true;

}; orList = function(xs){

var i$, len$, x;
for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
  x = xs[i$];
  if (x) {
    return true;
  }
}
return false;

}; any = curry$(function(f, xs){

var i$, len$, x;
for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
  x = xs[i$];
  if (f(x)) {
    return true;
  }
}
return false;

}); all = curry$(function(f, xs){

var i$, len$, x;
for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
  x = xs[i$];
  if (!f(x)) {
    return false;
  }
}
return true;

}); sort = function(xs){

return xs.concat().sort(function(x, y){
  if (x > y) {
    return 1;
  } else if (x < y) {
    return -1;
  } else {
    return 0;
  }
});

}; sortWith = curry$(function(f, xs){

return xs.concat().sort(f);

}); sortBy = curry$(function(f, xs){

return xs.concat().sort(function(x, y){
  if (f(x) > f(y)) {
    return 1;
  } else if (f(x) < f(y)) {
    return -1;
  } else {
    return 0;
  }
});

}); sum = function(xs){

var result, i$, len$, x;
result = 0;
for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
  x = xs[i$];
  result += x;
}
return result;

}; product = function(xs){

var result, i$, len$, x;
result = 1;
for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
  x = xs[i$];
  result *= x;
}
return result;

}; mean = average = function(xs){

var sum, i$, len$, x;
sum = 0;
for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
  x = xs[i$];
  sum += x;
}
return sum / xs.length;

}; maximum = function(xs){

var max, i$, ref$, len$, x;
max = xs[0];
for (i$ = 0, len$ = (ref$ = xs.slice(1)).length; i$ < len$; ++i$) {
  x = ref$[i$];
  if (x > max) {
    max = x;
  }
}
return max;

}; minimum = function(xs){

var min, i$, ref$, len$, x;
min = xs[0];
for (i$ = 0, len$ = (ref$ = xs.slice(1)).length; i$ < len$; ++i$) {
  x = ref$[i$];
  if (x < min) {
    min = x;
  }
}
return min;

}; maximumBy = curry$(function(f, xs){

var max, i$, ref$, len$, x;
max = xs[0];
for (i$ = 0, len$ = (ref$ = xs.slice(1)).length; i$ < len$; ++i$) {
  x = ref$[i$];
  if (f(x) > f(max)) {
    max = x;
  }
}
return max;

}); minimumBy = curry$(function(f, xs){

var min, i$, ref$, len$, x;
min = xs[0];
for (i$ = 0, len$ = (ref$ = xs.slice(1)).length; i$ < len$; ++i$) {
  x = ref$[i$];
  if (f(x) < f(min)) {
    min = x;
  }
}
return min;

}); scan = scanl = curry$(function(f, memo, xs){

var last, x;
last = memo;
return [memo].concat((function(){
  var i$, ref$, len$, results$ = [];
  for (i$ = 0, len$ = (ref$ = xs).length; i$ < len$; ++i$) {
    x = ref$[i$];
    results$.push(last = f(last, x));
  }
  return results$;
}()));

}); scan1 = scanl1 = curry$(function(f, xs){

if (!xs.length) {
  return;
}
return scan(f, xs[0], xs.slice(1));

}); scanr = curry$(function(f, memo, xs){

xs = xs.concat().reverse();
return scan(f, memo, xs).reverse();

}); scanr1 = curry$(function(f, xs){

if (!xs.length) {
  return;
}
xs = xs.concat().reverse();
return scan(f, xs[0], xs.slice(1)).reverse();

}); slice = curry$(function(x, y, xs){

return xs.slice(x, y);

}); take = curry$(function(n, xs){

if (n <= 0) {
  return xs.slice(0, 0);
} else {
  return xs.slice(0, n);
}

}); drop = curry$(function(n, xs){

if (n <= 0) {
  return xs;
} else {
  return xs.slice(n);
}

}); splitAt = curry$(function(n, xs){

return [take(n, xs), drop(n, xs)];

}); takeWhile = curry$(function(p, xs){

var len, i;
len = xs.length;
if (!len) {
  return xs;
}
i = 0;
while (i < len && p(xs[i])) {
  i += 1;
}
return xs.slice(0, i);

}); dropWhile = curry$(function(p, xs){

var len, i;
len = xs.length;
if (!len) {
  return xs;
}
i = 0;
while (i < len && p(xs[i])) {
  i += 1;
}
return xs.slice(i);

}); span = curry$(function(p, xs){

return [takeWhile(p, xs), dropWhile(p, xs)];

}); breakList = curry$(function(p, xs){

return span(compose$(p, not$), xs);

}); zip = curry$(function(xs, ys){

var result, len, i$, len$, i, x;
result = [];
len = ys.length;
for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
  i = i$;
  x = xs[i$];
  if (i === len) {
    break;
  }
  result.push([x, ys[i]]);
}
return result;

}); zipWith = curry$(function(f, xs, ys){

var result, len, i$, len$, i, x;
result = [];
len = ys.length;
for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
  i = i$;
  x = xs[i$];
  if (i === len) {
    break;
  }
  result.push(f(x, ys[i]));
}
return result;

}); zipAll = function(){

var xss, minLength, i$, len$, xs, ref$, i, lresult$, j$, results$ = [];
xss = slice$.call(arguments);
minLength = undefined;
for (i$ = 0, len$ = xss.length; i$ < len$; ++i$) {
  xs = xss[i$];
  minLength <= (ref$ = xs.length) || (minLength = ref$);
}
for (i$ = 0; i$ < minLength; ++i$) {
  i = i$;
  lresult$ = [];
  for (j$ = 0, len$ = xss.length; j$ < len$; ++j$) {
    xs = xss[j$];
    lresult$.push(xs[i]);
  }
  results$.push(lresult$);
}
return results$;

}; zipAllWith = function(f){

var xss, minLength, i$, len$, xs, ref$, i, results$ = [];
xss = slice$.call(arguments, 1);
minLength = undefined;
for (i$ = 0, len$ = xss.length; i$ < len$; ++i$) {
  xs = xss[i$];
  minLength <= (ref$ = xs.length) || (minLength = ref$);
}
for (i$ = 0; i$ < minLength; ++i$) {
  i = i$;
  results$.push(f.apply(null, (fn$())));
}
return results$;
function fn$(){
  var i$, ref$, len$, results$ = [];
  for (i$ = 0, len$ = (ref$ = xss).length; i$ < len$; ++i$) {
    xs = ref$[i$];
    results$.push(xs[i]);
  }
  return results$;
}

}; at = curry$(function(n, xs){

if (n < 0) {
  return xs[xs.length + n];
} else {
  return xs[n];
}

}); elemIndex = curry$(function(el, xs){

var i$, len$, i, x;
for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
  i = i$;
  x = xs[i$];
  if (x === el) {
    return i;
  }
}

}); elemIndices = curry$(function(el, xs){

var i$, len$, i, x, results$ = [];
for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
  i = i$;
  x = xs[i$];
  if (x === el) {
    results$.push(i);
  }
}
return results$;

}); findIndex = curry$(function(f, xs){

var i$, len$, i, x;
for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
  i = i$;
  x = xs[i$];
  if (f(x)) {
    return i;
  }
}

}); findIndices = curry$(function(f, xs){

var i$, len$, i, x, results$ = [];
for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
  i = i$;
  x = xs[i$];
  if (f(x)) {
    results$.push(i);
  }
}
return results$;

}); module.exports = {

each: each,
map: map,
filter: filter,
compact: compact,
reject: reject,
partition: partition,
find: find,
head: head,
first: first,
tail: tail,
last: last,
initial: initial,
empty: empty,
reverse: reverse,
difference: difference,
intersection: intersection,
union: union,
countBy: countBy,
groupBy: groupBy,
fold: fold,
fold1: fold1,
foldl: foldl,
foldl1: foldl1,
foldr: foldr,
foldr1: foldr1,
unfoldr: unfoldr,
andList: andList,
orList: orList,
any: any,
all: all,
unique: unique,
uniqueBy: uniqueBy,
sort: sort,
sortWith: sortWith,
sortBy: sortBy,
sum: sum,
product: product,
mean: mean,
average: average,
concat: concat,
concatMap: concatMap,
flatten: flatten,
maximum: maximum,
minimum: minimum,
maximumBy: maximumBy,
minimumBy: minimumBy,
scan: scan,
scan1: scan1,
scanl: scanl,
scanl1: scanl1,
scanr: scanr,
scanr1: scanr1,
slice: slice,
take: take,
drop: drop,
splitAt: splitAt,
takeWhile: takeWhile,
dropWhile: dropWhile,
span: span,
breakList: breakList,
zip: zip,
zipWith: zipWith,
zipAll: zipAll,
zipAllWith: zipAllWith,
at: at,
elemIndex: elemIndex,
elemIndices: elemIndices,
findIndex: findIndex,
findIndices: findIndices

}; function curry$(f, bound){

var context,
_curry = function(args) {
  return f.length > 1 ? function(){
    var params = args ? args.concat() : [];
    context = bound ? context || this : this;
    return params.push.apply(params, arguments) <
        f.length && arguments.length ?
      _curry.call(context, params) : f.apply(context, params);
  } : f;
};
return _curry();

} function in$(x, xs){

var i = -1, l = xs.length >>> 0;
while (++i < l) if (x === xs[i]) return true;
return false;

} function compose$() {

var functions = arguments;
return function() {
  var i, result;
  result = functions[0].apply(this, arguments);
  for (i = 1; i < functions.length; ++i) {
    result = functions[i](result);
  }
  return result;
};

} function not$(x){ return !x; } },{}],113:[function(require,module,exports){ // Generated by LiveScript 1.4.0 var max, min, negate, abs, signum, quot, rem, div, mod, recip, pi, tau, exp, sqrt, ln, pow, sin, tan, cos, asin, acos, atan, atan2, truncate, round, ceiling, floor, isItNaN, even, odd, gcd, lcm; max = curry$(function(x$, y$){

return x$ > y$ ? x$ : y$;

}); min = curry$(function(x$, y$){

return x$ < y$ ? x$ : y$;

}); negate = function(x){

return -x;

}; abs = Math.abs; signum = function(x){

if (x < 0) {
  return -1;
} else if (x > 0) {
  return 1;
} else {
  return 0;
}

}; quot = curry$(function(x, y){

return ~~(x / y);

}); rem = curry$(function(x$, y$){

return x$ % y$;

}); div = curry$(function(x, y){

return Math.floor(x / y);

}); mod = curry$(function(x$, y$){

var ref$;
return (((x$) % (ref$ = y$) + ref$) % ref$);

}); recip = (function(it){

return 1 / it;

}); pi = Math.PI; tau = pi * 2; exp = Math.exp; sqrt = Math.sqrt; ln = Math.log; pow = curry$(function(x$, y$){

return Math.pow(x$, y$);

}); sin = Math.sin; tan = Math.tan; cos = Math.cos; asin = Math.asin; acos = Math.acos; atan = Math.atan; atan2 = curry$(function(x, y){

return Math.atan2(x, y);

}); truncate = function(x){

return ~~x;

}; round = Math.round; ceiling = Math.ceil; floor = Math.floor; isItNaN = function(x){

return x !== x;

}; even = function(x){

return x % 2 === 0;

}; odd = function(x){

return x % 2 !== 0;

}; gcd = curry$(function(x, y){

var z;
x = Math.abs(x);
y = Math.abs(y);
while (y !== 0) {
  z = x % y;
  x = y;
  y = z;
}
return x;

}); lcm = curry$(function(x, y){

return Math.abs(Math.floor(x / gcd(x, y) * y));

}); module.exports = {

max: max,
min: min,
negate: negate,
abs: abs,
signum: signum,
quot: quot,
rem: rem,
div: div,
mod: mod,
recip: recip,
pi: pi,
tau: tau,
exp: exp,
sqrt: sqrt,
ln: ln,
pow: pow,
sin: sin,
tan: tan,
cos: cos,
acos: acos,
asin: asin,
atan: atan,
atan2: atan2,
truncate: truncate,
round: round,
ceiling: ceiling,
floor: floor,
isItNaN: isItNaN,
even: even,
odd: odd,
gcd: gcd,
lcm: lcm

}; function curry$(f, bound){

var context,
_curry = function(args) {
  return f.length > 1 ? function(){
    var params = args ? args.concat() : [];
    context = bound ? context || this : this;
    return params.push.apply(params, arguments) <
        f.length && arguments.length ?
      _curry.call(context, params) : f.apply(context, params);
  } : f;
};
return _curry();

} },{}],114:[function(require,module,exports){ // Generated by LiveScript 1.4.0 var values, keys, pairsToObj, objToPairs, listsToObj, objToLists, empty, each, map, compact, filter, reject, partition, find; values = function(object){

var i$, x, results$ = [];
for (i$ in object) {
  x = object[i$];
  results$.push(x);
}
return results$;

}; keys = function(object){

var x, results$ = [];
for (x in object) {
  results$.push(x);
}
return results$;

}; pairsToObj = function(object){

var i$, len$, x, resultObj$ = {};
for (i$ = 0, len$ = object.length; i$ < len$; ++i$) {
  x = object[i$];
  resultObj$[x[0]] = x[1];
}
return resultObj$;

}; objToPairs = function(object){

var key, value, results$ = [];
for (key in object) {
  value = object[key];
  results$.push([key, value]);
}
return results$;

}; listsToObj = curry$(function(keys, values){

var i$, len$, i, key, resultObj$ = {};
for (i$ = 0, len$ = keys.length; i$ < len$; ++i$) {
  i = i$;
  key = keys[i$];
  resultObj$[key] = values[i];
}
return resultObj$;

}); objToLists = function(object){

var keys, values, key, value;
keys = [];
values = [];
for (key in object) {
  value = object[key];
  keys.push(key);
  values.push(value);
}
return [keys, values];

}; empty = function(object){

var x;
for (x in object) {
  return false;
}
return true;

}; each = curry$(function(f, object){

var i$, x;
for (i$ in object) {
  x = object[i$];
  f(x);
}
return object;

}); map = curry$(function(f, object){

var k, x, resultObj$ = {};
for (k in object) {
  x = object[k];
  resultObj$[k] = f(x);
}
return resultObj$;

}); compact = function(object){

var k, x, resultObj$ = {};
for (k in object) {
  x = object[k];
  if (x) {
    resultObj$[k] = x;
  }
}
return resultObj$;

}; filter = curry$(function(f, object){

var k, x, resultObj$ = {};
for (k in object) {
  x = object[k];
  if (f(x)) {
    resultObj$[k] = x;
  }
}
return resultObj$;

}); reject = curry$(function(f, object){

var k, x, resultObj$ = {};
for (k in object) {
  x = object[k];
  if (!f(x)) {
    resultObj$[k] = x;
  }
}
return resultObj$;

}); partition = curry$(function(f, object){

var passed, failed, k, x;
passed = {};
failed = {};
for (k in object) {
  x = object[k];
  (f(x) ? passed : failed)[k] = x;
}
return [passed, failed];

}); find = curry$(function(f, object){

var i$, x;
for (i$ in object) {
  x = object[i$];
  if (f(x)) {
    return x;
  }
}

}); module.exports = {

values: values,
keys: keys,
pairsToObj: pairsToObj,
objToPairs: objToPairs,
listsToObj: listsToObj,
objToLists: objToLists,
empty: empty,
each: each,
map: map,
filter: filter,
compact: compact,
reject: reject,
partition: partition,
find: find

}; function curry$(f, bound){

var context,
_curry = function(args) {
  return f.length > 1 ? function(){
    var params = args ? args.concat() : [];
    context = bound ? context || this : this;
    return params.push.apply(params, arguments) <
        f.length && arguments.length ?
      _curry.call(context, params) : f.apply(context, params);
  } : f;
};
return _curry();

} },{}],115:[function(require,module,exports){ // Generated by LiveScript 1.4.0 var split, join, lines, unlines, words, unwords, chars, unchars, reverse, repeat, capitalize, camelize, dasherize; split = curry$(function(sep, str){

return str.split(sep);

}); join = curry$(function(sep, xs){

return xs.join(sep);

}); lines = function(str){

if (!str.length) {
  return [];
}
return str.split('\n');

}; unlines = function(it){

return it.join('\n');

}; words = function(str){

if (!str.length) {
  return [];
}
return str.split(/[ ]+/);

}; unwords = function(it){

return it.join(' ');

}; chars = function(it){

return it.split('');

}; unchars = function(it){

return it.join('');

}; reverse = function(str){

return str.split('').reverse().join('');

}; repeat = curry$(function(n, str){

var result, i$;
result = '';
for (i$ = 0; i$ < n; ++i$) {
  result += str;
}
return result;

}); capitalize = function(str){

return str.charAt(0).toUpperCase() + str.slice(1);

}; camelize = function(it){

return it.replace(/[-_]+(.)?/g, function(arg$, c){
  return (c != null ? c : '').toUpperCase();
});

}; dasherize = function(str){

return str.replace(/([^-A-Z])([A-Z]+)/g, function(arg$, lower, upper){
  return lower + "-" + (upper.length > 1
    ? upper
    : upper.toLowerCase());
}).replace(/^([A-Z]+)/, function(arg$, upper){
  if (upper.length > 1) {
    return upper + "-";
  } else {
    return upper.toLowerCase();
  }
});

}; module.exports = {

split: split,
join: join,
lines: lines,
unlines: unlines,
words: words,
unwords: unwords,
chars: chars,
unchars: unchars,
reverse: reverse,
repeat: repeat,
capitalize: capitalize,
camelize: camelize,
dasherize: dasherize

}; function curry$(f, bound){

var context,
_curry = function(args) {
  return f.length > 1 ? function(){
    var params = args ? args.concat() : [];
    context = bound ? context || this : this;
    return params.push.apply(params, arguments) <
        f.length && arguments.length ?
      _curry.call(context, params) : f.apply(context, params);
  } : f;
};
return _curry();

} },{}],116:[function(require,module,exports){ // Generated by LiveScript 1.4.0 var Func, List, Obj, Str, Num, id, isType, replicate, prelude, toString$ = {}.toString; Func = require(‘./Func.js’); List = require(‘./List.js’); Obj = require(‘./Obj.js’); Str = require(‘./Str.js’); Num = require(‘./Num.js’); id = function(x){

return x;

}; isType = curry$(function(type, x){

return toString$.call(x).slice(8, -1) === type;

}); replicate = curry$(function(n, x){

var i$, results$ = [];
for (i$ = 0; i$ < n; ++i$) {
  results$.push(x);
}
return results$;

}); Str.empty = List.empty; Str.slice = List.slice; Str.take = List.take; Str.drop = List.drop; Str.splitAt = List.splitAt; Str.takeWhile = List.takeWhile; Str.dropWhile = List.dropWhile; Str.span = List.span; Str.breakStr = List.breakList; prelude = {

Func: Func,
List: List,
Obj: Obj,
Str: Str,
Num: Num,
id: id,
isType: isType,
replicate: replicate

}; prelude.each = List.each; prelude.map = List.map; prelude.filter = List.filter; prelude.compact = List.compact; prelude.reject = List.reject; prelude.partition = List.partition; prelude.find = List.find; prelude.head = List.head; prelude.first = List.first; prelude.tail = List.tail; prelude.last = List.last; prelude.initial = List.initial; prelude.empty = List.empty; prelude.reverse = List.reverse; prelude.difference = List.difference; prelude.intersection = List.intersection; prelude.union = List.union; prelude.countBy = List.countBy; prelude.groupBy = List.groupBy; prelude.fold = List.fold; prelude.foldl = List.foldl; prelude.fold1 = List.fold1; prelude.foldl1 = List.foldl1; prelude.foldr = List.foldr; prelude.foldr1 = List.foldr1; prelude.unfoldr = List.unfoldr; prelude.andList = List.andList; prelude.orList = List.orList; prelude.any = List.any; prelude.all = List.all; prelude.unique = List.unique; prelude.uniqueBy = List.uniqueBy; prelude.sort = List.sort; prelude.sortWith = List.sortWith; prelude.sortBy = List.sortBy; prelude.sum = List.sum; prelude.product = List.product; prelude.mean = List.mean; prelude.average = List.average; prelude.concat = List.concat; prelude.concatMap = List.concatMap; prelude.flatten = List.flatten; prelude.maximum = List.maximum; prelude.minimum = List.minimum; prelude.maximumBy = List.maximumBy; prelude.minimumBy = List.minimumBy; prelude.scan = List.scan; prelude.scanl = List.scanl; prelude.scan1 = List.scan1; prelude.scanl1 = List.scanl1; prelude.scanr = List.scanr; prelude.scanr1 = List.scanr1; prelude.slice = List.slice; prelude.take = List.take; prelude.drop = List.drop; prelude.splitAt = List.splitAt; prelude.takeWhile = List.takeWhile; prelude.dropWhile = List.dropWhile; prelude.span = List.span; prelude.breakList = List.breakList; prelude.zip = List.zip; prelude.zipWith = List.zipWith; prelude.zipAll = List.zipAll; prelude.zipAllWith = List.zipAllWith; prelude.at = List.at; prelude.elemIndex = List.elemIndex; prelude.elemIndices = List.elemIndices; prelude.findIndex = List.findIndex; prelude.findIndices = List.findIndices; prelude.apply = Func.apply; prelude.curry = Func.curry; prelude.flip = Func.flip; prelude.fix = Func.fix; prelude.over = Func.over; prelude.split = Str.split; prelude.join = Str.join; prelude.lines = Str.lines; prelude.unlines = Str.unlines; prelude.words = Str.words; prelude.unwords = Str.unwords; prelude.chars = Str.chars; prelude.unchars = Str.unchars; prelude.repeat = Str.repeat; prelude.capitalize = Str.capitalize; prelude.camelize = Str.camelize; prelude.dasherize = Str.dasherize; prelude.values = Obj.values; prelude.keys = Obj.keys; prelude.pairsToObj = Obj.pairsToObj; prelude.objToPairs = Obj.objToPairs; prelude.listsToObj = Obj.listsToObj; prelude.objToLists = Obj.objToLists; prelude.max = Num.max; prelude.min = Num.min; prelude.negate = Num.negate; prelude.abs = Num.abs; prelude.signum = Num.signum; prelude.quot = Num.quot; prelude.rem = Num.rem; prelude.div = Num.div; prelude.mod = Num.mod; prelude.recip = Num.recip; prelude.pi = Num.pi; prelude.tau = Num.tau; prelude.exp = Num.exp; prelude.sqrt = Num.sqrt; prelude.ln = Num.ln; prelude.pow = Num.pow; prelude.sin = Num.sin; prelude.tan = Num.tan; prelude.cos = Num.cos; prelude.acos = Num.acos; prelude.asin = Num.asin; prelude.atan = Num.atan; prelude.atan2 = Num.atan2; prelude.truncate = Num.truncate; prelude.round = Num.round; prelude.ceiling = Num.ceiling; prelude.floor = Num.floor; prelude.isItNaN = Num.isItNaN; prelude.even = Num.even; prelude.odd = Num.odd; prelude.gcd = Num.gcd; prelude.lcm = Num.lcm; prelude.VERSION = ‘1.1.2’; module.exports = prelude; function curry$(f, bound){

var context,
_curry = function(args) {
  return f.length > 1 ? function(){
    var params = args ? args.concat() : [];
    context = bound ? context || this : this;
    return params.push.apply(params, arguments) <
        f.length && arguments.length ?
      _curry.call(context, params) : f.apply(context, params);
  } : f;
};
return _curry();

} },{“./Func.js”:111,“./List.js”:112,“./Num.js”:113,“./Obj.js”:114,“./Str.js”:115}],117:[function(require,module,exports){ // shim for using process in browser

var process = module.exports = {};

// cached from whatever global is present so that test runners that stub it // don’t break things. But we need to wrap it in a try catch in case it is // wrapped in strict mode code which doesn’t define any globals. It’s inside a // function because try/catches deoptimize in certain engines.

var cachedSetTimeout; var cachedClearTimeout;

(function () {

try {
  cachedSetTimeout = setTimeout;
} catch (e) {
  cachedSetTimeout = function () {
    throw new Error('setTimeout is not defined');
  }
}
try {
  cachedClearTimeout = clearTimeout;
} catch (e) {
  cachedClearTimeout = function () {
    throw new Error('clearTimeout is not defined');
  }
}

} ()) var queue = []; var draining = false; var currentQueue; var queueIndex = -1;

function cleanUpNextTick() {

if (!draining || !currentQueue) {
    return;
}
draining = false;
if (currentQueue.length) {
    queue = currentQueue.concat(queue);
} else {
    queueIndex = -1;
}
if (queue.length) {
    drainQueue();
}

}

function drainQueue() {

if (draining) {
    return;
}
var timeout = cachedSetTimeout(cleanUpNextTick);
draining = true;

var len = queue.length;
while(len) {
    currentQueue = queue;
    queue = [];
    while (++queueIndex < len) {
        if (currentQueue) {
            currentQueue[queueIndex].run();
        }
    }
    queueIndex = -1;
    len = queue.length;
}
currentQueue = null;
draining = false;
cachedClearTimeout(timeout);

}

process.nextTick = function (fun) {

var args = new Array(arguments.length - 1);
if (arguments.length > 1) {
    for (var i = 1; i < arguments.length; i++) {
        args[i - 1] = arguments[i];
    }
}
queue.push(new Item(fun, args));
if (queue.length === 1 && !draining) {
    cachedSetTimeout(drainQueue, 0);
}

};

// v8 likes predictible objects function Item(fun, array) {

this.fun = fun;
this.array = array;

} Item.prototype.run = function () {

this.fun.apply(null, this.array);

}; process.title = ‘browser’; process.browser = true; process.env = {}; process.argv = []; process.version = ”; // empty string to avoid regexp issues process.versions = {};

function noop() {}

process.on = noop; process.addListener = noop; process.once = noop; process.off = noop; process.removeListener = noop; process.removeAllListeners = noop; process.emit = noop;

process.binding = function (name) {

throw new Error('process.binding is not supported');

};

process.cwd = function () { return ‘/’ }; process.chdir = function (dir) {

throw new Error('process.chdir is not supported');

}; process.umask = function() { return 0; };

},{}],118:[function(require,module,exports){ // Generated by LiveScript 1.4.0 (function(){

var ref$, any, all, isItNaN, types, defaultType, customTypes, toString$ = {}.toString;
ref$ = require('prelude-ls'), any = ref$.any, all = ref$.all, isItNaN = ref$.isItNaN;
types = {
  Number: {
    typeOf: 'Number',
    validate: function(it){
      return !isItNaN(it);
    }
  },
  NaN: {
    typeOf: 'Number',
    validate: isItNaN
  },
  Int: {
    typeOf: 'Number',
    validate: function(it){
      return !isItNaN(it) && it % 1 === 0;
    }
  },
  Float: {
    typeOf: 'Number',
    validate: function(it){
      return !isItNaN(it);
    }
  },
  Date: {
    typeOf: 'Date',
    validate: function(it){
      return !isItNaN(it.getTime());
    }
  }
};
defaultType = {
  array: 'Array',
  tuple: 'Array'
};
function checkArray(input, type){
  return all(function(it){
    return checkMultiple(it, type.of);
  }, input);
}
function checkTuple(input, type){
  var i, i$, ref$, len$, types;
  i = 0;
  for (i$ = 0, len$ = (ref$ = type.of).length; i$ < len$; ++i$) {
    types = ref$[i$];
    if (!checkMultiple(input[i], types)) {
      return false;
    }
    i++;
  }
  return input.length <= i;
}
function checkFields(input, type){
  var inputKeys, numInputKeys, k, numOfKeys, key, ref$, types;
  inputKeys = {};
  numInputKeys = 0;
  for (k in input) {
    inputKeys[k] = true;
    numInputKeys++;
  }
  numOfKeys = 0;
  for (key in ref$ = type.of) {
    types = ref$[key];
    if (!checkMultiple(input[key], types)) {
      return false;
    }
    if (inputKeys[key]) {
      numOfKeys++;
    }
  }
  return type.subset || numInputKeys === numOfKeys;
}
function checkStructure(input, type){
  if (!(input instanceof Object)) {
    return false;
  }
  switch (type.structure) {
  case 'fields':
    return checkFields(input, type);
  case 'array':
    return checkArray(input, type);
  case 'tuple':
    return checkTuple(input, type);
  }
}
function check(input, typeObj){
  var type, structure, setting, that;
  type = typeObj.type, structure = typeObj.structure;
  if (type) {
    if (type === '*') {
      return true;
    }
    setting = customTypes[type] || types[type];
    if (setting) {
      return setting.typeOf === toString$.call(input).slice(8, -1) && setting.validate(input);
    } else {
      return type === toString$.call(input).slice(8, -1) && (!structure || checkStructure(input, typeObj));
    }
  } else if (structure) {
    if (that = defaultType[structure]) {
      if (that !== toString$.call(input).slice(8, -1)) {
        return false;
      }
    }
    return checkStructure(input, typeObj);
  } else {
    throw new Error("No type defined. Input: " + input + ".");
  }
}
function checkMultiple(input, types){
  if (toString$.call(types).slice(8, -1) !== 'Array') {
    throw new Error("Types must be in an array. Input: " + input + ".");
  }
  return any(function(it){
    return check(input, it);
  }, types);
}
module.exports = function(parsedType, input, options){
  options == null && (options = {});
  customTypes = options.customTypes || {};
  return checkMultiple(input, parsedType);
};

}).call(this);

},{“prelude-ls”:116}],119:[function(require,module,exports){ // Generated by LiveScript 1.4.0 (function(){

var VERSION, parseType, parsedTypeCheck, typeCheck;
VERSION = '0.3.2';
parseType = require('./parse-type');
parsedTypeCheck = require('./check');
typeCheck = function(type, input, options){
  return parsedTypeCheck(parseType(type), input, options);
};
module.exports = {
  VERSION: VERSION,
  typeCheck: typeCheck,
  parsedTypeCheck: parsedTypeCheck,
  parseType: parseType
};

}).call(this);

},{“./check”:118,“./parse-type”:120}],120:[function(require,module,exports){ // Generated by LiveScript 1.4.0 (function(){

var identifierRegex, tokenRegex;
identifierRegex = /[\$\w]+/;
function peek(tokens){
  var token;
  token = tokens[0];
  if (token == null) {
    throw new Error('Unexpected end of input.');
  }
  return token;
}
function consumeIdent(tokens){
  var token;
  token = peek(tokens);
  if (!identifierRegex.test(token)) {
    throw new Error("Expected text, got '" + token + "' instead.");
  }
  return tokens.shift();
}
function consumeOp(tokens, op){
  var token;
  token = peek(tokens);
  if (token !== op) {
    throw new Error("Expected '" + op + "', got '" + token + "' instead.");
  }
  return tokens.shift();
}
function maybeConsumeOp(tokens, op){
  var token;
  token = tokens[0];
  if (token === op) {
    return tokens.shift();
  } else {
    return null;
  }
}
function consumeArray(tokens){
  var types;
  consumeOp(tokens, '[');
  if (peek(tokens) === ']') {
    throw new Error("Must specify type of Array - eg. [Type], got [] instead.");
  }
  types = consumeTypes(tokens);
  consumeOp(tokens, ']');
  return {
    structure: 'array',
    of: types
  };
}
function consumeTuple(tokens){
  var components;
  components = [];
  consumeOp(tokens, '(');
  if (peek(tokens) === ')') {
    throw new Error("Tuple must be of at least length 1 - eg. (Type), got () instead.");
  }
  for (;;) {
    components.push(consumeTypes(tokens));
    maybeConsumeOp(tokens, ',');
    if (')' === peek(tokens)) {
      break;
    }
  }
  consumeOp(tokens, ')');
  return {
    structure: 'tuple',
    of: components
  };
}
function consumeFields(tokens){
  var fields, subset, ref$, key, types;
  fields = {};
  consumeOp(tokens, '{');
  subset = false;
  for (;;) {
    if (maybeConsumeOp(tokens, '...')) {
      subset = true;
      break;
    }
    ref$ = consumeField(tokens), key = ref$[0], types = ref$[1];
    fields[key] = types;
    maybeConsumeOp(tokens, ',');
    if ('}' === peek(tokens)) {
      break;
    }
  }
  consumeOp(tokens, '}');
  return {
    structure: 'fields',
    of: fields,
    subset: subset
  };
}
function consumeField(tokens){
  var key, types;
  key = consumeIdent(tokens);
  consumeOp(tokens, ':');
  types = consumeTypes(tokens);
  return [key, types];
}
function maybeConsumeStructure(tokens){
  switch (tokens[0]) {
  case '[':
    return consumeArray(tokens);
  case '(':
    return consumeTuple(tokens);
  case '{':
    return consumeFields(tokens);
  }
}
function consumeType(tokens){
  var token, wildcard, type, structure;
  token = peek(tokens);
  wildcard = token === '*';
  if (wildcard || identifierRegex.test(token)) {
    type = wildcard
      ? consumeOp(tokens, '*')
      : consumeIdent(tokens);
    structure = maybeConsumeStructure(tokens);
    if (structure) {
      return structure.type = type, structure;
    } else {
      return {
        type: type
      };
    }
  } else {
    structure = maybeConsumeStructure(tokens);
    if (!structure) {
      throw new Error("Unexpected character: " + token);
    }
    return structure;
  }
}
function consumeTypes(tokens){
  var lookahead, types, typesSoFar, typeObj, type;
  if ('::' === peek(tokens)) {
    throw new Error("No comment before comment separator '::' found.");
  }
  lookahead = tokens[1];
  if (lookahead != null && lookahead === '::') {
    tokens.shift();
    tokens.shift();
  }
  types = [];
  typesSoFar = {};
  if ('Maybe' === peek(tokens)) {
    tokens.shift();
    types = [
      {
        type: 'Undefined'
      }, {
        type: 'Null'
      }
    ];
    typesSoFar = {
      Undefined: true,
      Null: true
    };
  }
  for (;;) {
    typeObj = consumeType(tokens), type = typeObj.type;
    if (!typesSoFar[type]) {
      types.push(typeObj);
    }
    typesSoFar[type] = true;
    if (!maybeConsumeOp(tokens, '|')) {
      break;
    }
  }
  return types;
}
tokenRegex = RegExp('\\.\\.\\.|::|->|' + identifierRegex.source + '|\\S', 'g');
module.exports = function(input){
  var tokens, e;
  if (!input.length) {
    throw new Error('No type specified.');
  }
  tokens = input.match(tokenRegex) || [];
  if (in$('->', tokens)) {
    throw new Error("Function types are not supported.\ To validate that something is a function, you may use 'Function'.");
  }
  try {
    return consumeTypes(tokens);
  } catch (e$) {
    e = e$;
    throw new Error(e.message + " - Remaining tokens: " + JSON.stringify(tokens) + " - Initial input: '" + input + "'");
  }
};
function in$(x, xs){
  var i = -1, l = xs.length >>> 0;
  while (++i < l) if (x === xs[i]) return true;
  return false;
}

}).call(this);

},{}],121:[function(require,module,exports){ module.exports = function isBuffer(arg) {

return arg && typeof arg === 'object'
  && typeof arg.copy === 'function'
  && typeof arg.fill === 'function'
  && typeof arg.readUInt8 === 'function';

} },{}],122:[function(require,module,exports){ (function (process,global){ // Copyright Joyent, Inc. and other Node contributors. // // 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.

var formatRegExp = /%[sdj%]/g; exports.format = function(f) {

if (!isString(f)) {
  var objects = [];
  for (var i = 0; i < arguments.length; i++) {
    objects.push(inspect(arguments[i]));
  }
  return objects.join(' ');
}

var i = 1;
var args = arguments;
var len = args.length;
var str = String(f).replace(formatRegExp, function(x) {
  if (x === '%%') return '%';
  if (i >= len) return x;
  switch (x) {
    case '%s': return String(args[i++]);
    case '%d': return Number(args[i++]);
    case '%j':
      try {
        return JSON.stringify(args[i++]);
      } catch (_) {
        return '[Circular]';
      }
    default:
      return x;
  }
});
for (var x = args[i]; i < len; x = args[++i]) {
  if (isNull(x) || !isObject(x)) {
    str += ' ' + x;
  } else {
    str += ' ' + inspect(x);
  }
}
return str;

};

// Mark that a method should not be used. // Returns a modified function which warns once by default. // If –no-deprecation is set, then it is a no-op. exports.deprecate = function(fn, msg) {

// Allow for deprecating things in the process of starting up.
if (isUndefined(global.process)) {
  return function() {
    return exports.deprecate(fn, msg).apply(this, arguments);
  };
}

if (process.noDeprecation === true) {
  return fn;
}

var warned = false;
function deprecated() {
  if (!warned) {
    if (process.throwDeprecation) {
      throw new Error(msg);
    } else if (process.traceDeprecation) {
      console.trace(msg);
    } else {
      console.error(msg);
    }
    warned = true;
  }
  return fn.apply(this, arguments);
}

return deprecated;

};

var debugs = {}; var debugEnviron; exports.debuglog = function(set) {

if (isUndefined(debugEnviron))
  debugEnviron = process.env.NODE_DEBUG || '';
set = set.toUpperCase();
if (!debugs[set]) {
  if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) {
    var pid = process.pid;
    debugs[set] = function() {
      var msg = exports.format.apply(exports, arguments);
      console.error('%s %d: %s', set, pid, msg);
    };
  } else {
    debugs[set] = function() {};
  }
}
return debugs[set];

};

/**

* Echos the value of a value. Trys to print the value out
* in the best way possible given the different types.
*
* @param {Object} obj The object to print out.
* @param {Object} opts Optional options object that alters the output.
*/

/* legacy: obj, showHidden, depth, colors*/ function inspect(obj, opts) {

// default options
var ctx = {
  seen: [],
  stylize: stylizeNoColor
};
// legacy...
if (arguments.length >= 3) ctx.depth = arguments[2];
if (arguments.length >= 4) ctx.colors = arguments[3];
if (isBoolean(opts)) {
  // legacy...
  ctx.showHidden = opts;
} else if (opts) {
  // got an "options" object
  exports._extend(ctx, opts);
}
// set default options
if (isUndefined(ctx.showHidden)) ctx.showHidden = false;
if (isUndefined(ctx.depth)) ctx.depth = 2;
if (isUndefined(ctx.colors)) ctx.colors = false;
if (isUndefined(ctx.customInspect)) ctx.customInspect = true;
if (ctx.colors) ctx.stylize = stylizeWithColor;
return formatValue(ctx, obj, ctx.depth);

} exports.inspect = inspect;

// en.wikipedia.org/wiki/ANSI_escape_code#graphics inspect.colors = {

'bold' : [1, 22],
'italic' : [3, 23],
'underline' : [4, 24],
'inverse' : [7, 27],
'white' : [37, 39],
'grey' : [90, 39],
'black' : [30, 39],
'blue' : [34, 39],
'cyan' : [36, 39],
'green' : [32, 39],
'magenta' : [35, 39],
'red' : [31, 39],
'yellow' : [33, 39]

};

// Don’t use ‘blue’ not visible on cmd.exe inspect.styles = {

'special': 'cyan',
'number': 'yellow',
'boolean': 'yellow',
'undefined': 'grey',
'null': 'bold',
'string': 'green',
'date': 'magenta',
// "name": intentionally not styling
'regexp': 'red'

};

function stylizeWithColor(str, styleType) {

var style = inspect.styles[styleType];

if (style) {
  return '\u001b[' + inspect.colors[style][0] + 'm' + str +
         '\u001b[' + inspect.colors[style][1] + 'm';
} else {
  return str;
}

}

function stylizeNoColor(str, styleType) {

return str;

}

function arrayToHash(array) {

var hash = {};

array.forEach(function(val, idx) {
  hash[val] = true;
});

return hash;

}

function formatValue(ctx, value, recurseTimes) {

// Provide a hook for user-specified inspect functions.
// Check that value is an object with an inspect function on it
if (ctx.customInspect &&
    value &&
    isFunction(value.inspect) &&
    // Filter out the util module, it's inspect function is special
    value.inspect !== exports.inspect &&
    // Also filter out any prototype objects using the circular check.
    !(value.constructor && value.constructor.prototype === value)) {
  var ret = value.inspect(recurseTimes, ctx);
  if (!isString(ret)) {
    ret = formatValue(ctx, ret, recurseTimes);
  }
  return ret;
}

// Primitive types cannot have properties
var primitive = formatPrimitive(ctx, value);
if (primitive) {
  return primitive;
}

// Look up the keys of the object.
var keys = Object.keys(value);
var visibleKeys = arrayToHash(keys);

if (ctx.showHidden) {
  keys = Object.getOwnPropertyNames(value);
}

// IE doesn't make error fields non-enumerable
// http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx
if (isError(value)
    && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) {
  return formatError(value);
}

// Some type of object without properties can be shortcutted.
if (keys.length === 0) {
  if (isFunction(value)) {
    var name = value.name ? ': ' + value.name : '';
    return ctx.stylize('[Function' + name + ']', 'special');
  }
  if (isRegExp(value)) {
    return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
  }
  if (isDate(value)) {
    return ctx.stylize(Date.prototype.toString.call(value), 'date');
  }
  if (isError(value)) {
    return formatError(value);
  }
}

var base = '', array = false, braces = ['{', '}'];

// Make Array say that they are Array
if (isArray(value)) {
  array = true;
  braces = ['[', ']'];
}

// Make functions say that they are functions
if (isFunction(value)) {
  var n = value.name ? ': ' + value.name : '';
  base = ' [Function' + n + ']';
}

// Make RegExps say that they are RegExps
if (isRegExp(value)) {
  base = ' ' + RegExp.prototype.toString.call(value);
}

// Make dates with properties first say the date
if (isDate(value)) {
  base = ' ' + Date.prototype.toUTCString.call(value);
}

// Make error with message first say the error
if (isError(value)) {
  base = ' ' + formatError(value);
}

if (keys.length === 0 && (!array || value.length == 0)) {
  return braces[0] + base + braces[1];
}

if (recurseTimes < 0) {
  if (isRegExp(value)) {
    return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
  } else {
    return ctx.stylize('[Object]', 'special');
  }
}

ctx.seen.push(value);

var output;
if (array) {
  output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);
} else {
  output = keys.map(function(key) {
    return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);
  });
}

ctx.seen.pop();

return reduceToSingleString(output, base, braces);

}

function formatPrimitive(ctx, value) {

if (isUndefined(value))
  return ctx.stylize('undefined', 'undefined');
if (isString(value)) {
  var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '')
                                           .replace(/'/g, "\\'")
                                           .replace(/\\"/g, '"') + '\'';
  return ctx.stylize(simple, 'string');
}
if (isNumber(value))
  return ctx.stylize('' + value, 'number');
if (isBoolean(value))
  return ctx.stylize('' + value, 'boolean');
// For some reason typeof null is "object", so special case here.
if (isNull(value))
  return ctx.stylize('null', 'null');

}

function formatError(value) {

return '[' + Error.prototype.toString.call(value) + ']';

}

function formatArray(ctx, value, recurseTimes, visibleKeys, keys) {

var output = [];
for (var i = 0, l = value.length; i < l; ++i) {
  if (hasOwnProperty(value, String(i))) {
    output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
        String(i), true));
  } else {
    output.push('');
  }
}
keys.forEach(function(key) {
  if (!key.match(/^\d+$/)) {
    output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
        key, true));
  }
});
return output;

}

function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {

var name, str, desc;
desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };
if (desc.get) {
  if (desc.set) {
    str = ctx.stylize('[Getter/Setter]', 'special');
  } else {
    str = ctx.stylize('[Getter]', 'special');
  }
} else {
  if (desc.set) {
    str = ctx.stylize('[Setter]', 'special');
  }
}
if (!hasOwnProperty(visibleKeys, key)) {
  name = '[' + key + ']';
}
if (!str) {
  if (ctx.seen.indexOf(desc.value) < 0) {
    if (isNull(recurseTimes)) {
      str = formatValue(ctx, desc.value, null);
    } else {
      str = formatValue(ctx, desc.value, recurseTimes - 1);
    }
    if (str.indexOf('\n') > -1) {
      if (array) {
        str = str.split('\n').map(function(line) {
          return '  ' + line;
        }).join('\n').substr(2);
      } else {
        str = '\n' + str.split('\n').map(function(line) {
          return '   ' + line;
        }).join('\n');
      }
    }
  } else {
    str = ctx.stylize('[Circular]', 'special');
  }
}
if (isUndefined(name)) {
  if (array && key.match(/^\d+$/)) {
    return str;
  }
  name = JSON.stringify('' + key);
  if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) {
    name = name.substr(1, name.length - 2);
    name = ctx.stylize(name, 'name');
  } else {
    name = name.replace(/'/g, "\\'")
               .replace(/\\"/g, '"')
               .replace(/(^"|"$)/g, "'");
    name = ctx.stylize(name, 'string');
  }
}

return name + ': ' + str;

}

function reduceToSingleString(output, base, braces) {

var numLinesEst = 0;
var length = output.reduce(function(prev, cur) {
  numLinesEst++;
  if (cur.indexOf('\n') >= 0) numLinesEst++;
  return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1;
}, 0);

if (length > 60) {
  return braces[0] +
         (base === '' ? '' : base + '\n ') +
         ' ' +
         output.join(',\n  ') +
         ' ' +
         braces[1];
}

return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];

}

// NOTE: These type checking functions intentionally don’t use ‘instanceof` // because it is fragile and can be easily faked with `Object.create()`. function isArray(ar) {

return Array.isArray(ar);

} exports.isArray = isArray;

function isBoolean(arg) {

return typeof arg === 'boolean';

} exports.isBoolean = isBoolean;

function isNull(arg) {

return arg === null;

} exports.isNull = isNull;

function isNullOrUndefined(arg) {

return arg == null;

} exports.isNullOrUndefined = isNullOrUndefined;

function isNumber(arg) {

return typeof arg === 'number';

} exports.isNumber = isNumber;

function isString(arg) {

return typeof arg === 'string';

} exports.isString = isString;

function isSymbol(arg) {

return typeof arg === 'symbol';

} exports.isSymbol = isSymbol;

function isUndefined(arg) {

return arg === void 0;

} exports.isUndefined = isUndefined;

function isRegExp(re) {

return isObject(re) && objectToString(re) === '[object RegExp]';

} exports.isRegExp = isRegExp;

function isObject(arg) {

return typeof arg === 'object' && arg !== null;

} exports.isObject = isObject;

function isDate(d) {

return isObject(d) && objectToString(d) === '[object Date]';

} exports.isDate = isDate;

function isError(e) {

return isObject(e) &&
    (objectToString(e) === '[object Error]' || e instanceof Error);

} exports.isError = isError;

function isFunction(arg) {

return typeof arg === 'function';

} exports.isFunction = isFunction;

function isPrimitive(arg) {

return arg === null ||
       typeof arg === 'boolean' ||
       typeof arg === 'number' ||
       typeof arg === 'string' ||
       typeof arg === 'symbol' ||  // ES6 symbol
       typeof arg === 'undefined';

} exports.isPrimitive = isPrimitive;

exports.isBuffer = require(‘./support/isBuffer’);

function objectToString(o) {

return Object.prototype.toString.call(o);

}

function pad(n) {

return n < 10 ? '0' + n.toString(10) : n.toString(10);

}

var months = [‘Jan’, ‘Feb’, ‘Mar’, ‘Apr’, ‘May’, ‘Jun’, ‘Jul’, ‘Aug’, ‘Sep’,

'Oct', 'Nov', 'Dec'];

// 26 Feb 16:19:34 function timestamp() {

var d = new Date();
var time = [pad(d.getHours()),
            pad(d.getMinutes()),
            pad(d.getSeconds())].join(':');
return [d.getDate(), months[d.getMonth()], time].join(' ');

}

// log is just a thin wrapper to console.log that prepends a timestamp exports.log = function() {

console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments));

};

/**

* Inherit the prototype methods from one constructor into another.
*
* The Function.prototype.inherits from lang.js rewritten as a standalone
* function (not on Function.prototype). NOTE: If this file is to be loaded
* during bootstrapping this function needs to be rewritten using some native
* functions as prototype setup using normal JavaScript does not work as
* expected during bootstrapping (see mirror.js in r114903).
*
* @param {function} ctor Constructor function which needs to inherit the
*     prototype.
* @param {function} superCtor Constructor function to inherit prototype from.
*/

exports.inherits = require(‘inherits’);

exports._extend = function(origin, add) {

// Don't do anything if add isn't an object
if (!add || !isObject(add)) return origin;

var keys = Object.keys(add);
var i = keys.length;
while (i--) {
  origin[keys[i]] = add[keys[i]];
}
return origin;

};

function hasOwnProperty(obj, prop) {

return Object.prototype.hasOwnProperty.call(obj, prop);

}

}).call(this,require(‘_process’),typeof global !== “undefined” ? global : typeof self !== “undefined” ? self : typeof window !== “undefined” ? window : {}) },{“./support/isBuffer”:121,“_process”:117,“inherits”:99}],123:[function(require,module,exports){ module.exports = extend

var hasOwnProperty = Object.prototype.hasOwnProperty;

function extend() {

var target = {}

for (var i = 0; i < arguments.length; i++) {
    var source = arguments[i]

    for (var key in source) {
        if (hasOwnProperty.call(source, key)) {
            target[key] = source[key]
        }
    }
}

return target

}

},{}],124:[function(require,module,exports){ /**

* @fileoverview Common utils for AST.
* @author Gyandeep Singh
*/

“use strict”;

//—————————————————————————— // Requirements //——————————————————————————

var esutils = require(“esutils”);

//—————————————————————————— // Helpers //——————————————————————————

var anyFunctionPattern = /^(?:Function(?:Declaration|Expression)|ArrowFunctionExpression)$/; var arrayOrTypedArrayPattern = /Array$/; var arrayMethodPattern = /^(?:every|filter|find|findIndex|forEach|map|some)$/; var bindOrCallOrApplyPattern = /^(?:bind|call|apply)$/; var breakableTypePattern = /^(?:(?:Do)?While|For(?:In|Of)?|Switch)Statement$/; var thisTagPattern = /^[s*]*@this/m;

/**

* Checks reference if is non initializer and writable.
* @param {Reference} reference - A reference to check.
* @param {int} index - The index of the reference in the references.
* @param {Reference[]} references - The array that the reference belongs to.
* @returns {boolean} Success/Failure
* @private
*/

function isModifyingReference(reference, index, references) {

var identifier = reference.identifier,
    modifyingDifferentIdentifier;

/*
 * Destructuring assignments can have multiple default value, so
 * possibly there are multiple writeable references for the same
 * identifier.
 */
modifyingDifferentIdentifier = index === 0 ||
    references[index - 1].identifier !== identifier;

return (identifier &&
    reference.init === false &&
    reference.isWrite() &&
    modifyingDifferentIdentifier
);

}

/**

* Checks whether or not a node is a constructor.
* @param {ASTNode} node - A function node to check.
* @returns {boolean} Wehether or not a node is a constructor.
*/

function isES5Constructor(node) {

return (
    node.id &&
    node.id.name[0] !== node.id.name[0].toLocaleLowerCase()
);

}

/**

* Finds a function node from ancestors of a node.
* @param {ASTNode} node - A start node to find.
* @returns {Node|null} A found function node.
*/

function getUpperFunction(node) {

while (node) {
    if (anyFunctionPattern.test(node.type)) {
        return node;
    }
    node = node.parent;
}
return null;

}

/**

* Checks whether or not a node is `null` or `undefined`.
* @param {ASTNode} node - A node to check.
* @returns {boolean} Whether or not the node is a `null` or `undefined`.
* @public
*/

function isNullOrUndefined(node) {

return (
    (node.type === "Literal" && node.value === null) ||
    (node.type === "Identifier" && node.name === "undefined") ||
    (node.type === "UnaryExpression" && node.operator === "void")
);

}

/**

* Checks whether or not a node is callee.
* @param {ASTNode} node - A node to check.
* @returns {boolean} Whether or not the node is callee.
*/

function isCallee(node) {

return node.parent.type === "CallExpression" && node.parent.callee === node;

}

/**

* Checks whether or not a node is `Reclect.apply`.
* @param {ASTNode} node - A node to check.
* @returns {boolean} Whether or not the node is a `Reclect.apply`.
*/

function isReflectApply(node) {

return (
    node.type === "MemberExpression" &&
    node.object.type === "Identifier" &&
    node.object.name === "Reflect" &&
    node.property.type === "Identifier" &&
    node.property.name === "apply" &&
    node.computed === false
);

}

/**

* Checks whether or not a node is `Array.from`.
* @param {ASTNode} node - A node to check.
* @returns {boolean} Whether or not the node is a `Array.from`.
*/

function isArrayFromMethod(node) {

return (
    node.type === "MemberExpression" &&
    node.object.type === "Identifier" &&
    arrayOrTypedArrayPattern.test(node.object.name) &&
    node.property.type === "Identifier" &&
    node.property.name === "from" &&
    node.computed === false
);

}

/**

* Checks whether or not a node is a method which has `thisArg`.
* @param {ASTNode} node - A node to check.
* @returns {boolean} Whether or not the node is a method which has `thisArg`.
*/

function isMethodWhichHasThisArg(node) {

while (node) {
    if (node.type === "Identifier") {
        return arrayMethodPattern.test(node.name);
    }
    if (node.type === "MemberExpression" && !node.computed) {
        node = node.property;
        continue;
    }

    break;
}

return false;

}

/**

* Checks whether or not a node has a `@this` tag in its comments.
* @param {ASTNode} node - A node to check.
* @param {SourceCode} sourceCode - A SourceCode instance to get comments.
* @returns {boolean} Whether or not the node has a `@this` tag in its comments.
*/

function hasJSDocThisTag(node, sourceCode) {

var jsdocComment = sourceCode.getJSDocComment(node);

if (jsdocComment && thisTagPattern.test(jsdocComment.value)) {
    return true;
}

// Checks `@this` in its leading comments for callbacks,
// because callbacks don't have its JSDoc comment.
// e.g.
//     sinon.test(/* @this sinon.Sandbox */function() { this.spy(); });
return sourceCode.getComments(node).leading.some(function(comment) {
    return thisTagPattern.test(comment.value);
});

}

/**

* Determines if a node is surrounded by parentheses.
* @param {SourceCode} sourceCode The ESLint source code object
* @param {ASTNode} node The node to be checked.
* @returns {boolean} True if the node is parenthesised.
* @private
*/

function isParenthesised(sourceCode, node) {

var previousToken = sourceCode.getTokenBefore(node),
    nextToken = sourceCode.getTokenAfter(node);

return Boolean(previousToken && nextToken) &&
    previousToken.value === "(" && previousToken.range[1] <= node.range[0] &&
    nextToken.value === ")" && nextToken.range[0] >= node.range[1];

}

//—————————————————————————— // Public Interface //——————————————————————————

module.exports = {

/**
 * Determines whether two adjacent tokens are on the same line.
 * @param {Object} left - The left token object.
 * @param {Object} right - The right token object.
 * @returns {boolean} Whether or not the tokens are on the same line.
 * @public
 */
isTokenOnSameLine: function(left, right) {
    return left.loc.end.line === right.loc.start.line;
},

isNullOrUndefined: isNullOrUndefined,
isCallee: isCallee,
isES5Constructor: isES5Constructor,
getUpperFunction: getUpperFunction,
isArrayFromMethod: isArrayFromMethod,
isParenthesised: isParenthesised,

/**
 * Checks whether or not a given node is a string literal.
 * @param {ASTNode} node - A node to check.
 * @returns {boolean} `true` if the node is a string literal.
 */
isStringLiteral: function(node) {
    return (
        (node.type === "Literal" && typeof node.value === "string") ||
        node.type === "TemplateLiteral"
    );
},

/**
 * Checks whether a given node is a breakable statement or not.
 * The node is breakable if the node is one of the following type:
 *
 * - DoWhileStatement
 * - ForInStatement
 * - ForOfStatement
 * - ForStatement
 * - SwitchStatement
 * - WhileStatement
 *
 * @param {ASTNode} node - A node to check.
 * @returns {boolean} `true` if the node is breakable.
 */
isBreakableStatement: function(node) {
    return breakableTypePattern.test(node.type);
},

/**
 * Gets the label if the parent node of a given node is a LabeledStatement.
 *
 * @param {ASTNode} node - A node to get.
 * @returns {string|null} The label or `null`.
 */
getLabel: function(node) {
    if (node.parent.type === "LabeledStatement") {
        return node.parent.label.name;
    }
    return null;
},

/**
 * Gets references which are non initializer and writable.
 * @param {Reference[]} references - An array of references.
 * @returns {Reference[]} An array of only references which are non initializer and writable.
 * @public
 */
getModifyingReferences: function(references) {
    return references.filter(isModifyingReference);
},

/**
 * Validate that a string passed in is surrounded by the specified character
 * @param  {string} val The text to check.
 * @param  {string} character The character to see if it's surrounded by.
 * @returns {boolean} True if the text is surrounded by the character, false if not.
 * @private
 */
isSurroundedBy: function(val, character) {
    return val[0] === character && val[val.length - 1] === character;
},

/**
 * Returns whether the provided node is an ESLint directive comment or not
 * @param {LineComment|BlockComment} node The node to be checked
 * @returns {boolean} `true` if the node is an ESLint directive comment
 */
isDirectiveComment: function(node) {
    var comment = node.value.trim();

    return (
        node.type === "Line" && comment.indexOf("eslint-") === 0 ||
        node.type === "Block" && (
            comment.indexOf("global ") === 0 ||
            comment.indexOf("eslint ") === 0 ||
            comment.indexOf("eslint-") === 0
        )
    );
},

/**
 * Gets the trailing statement of a given node.
 *
 *     if (code)
 *         consequent;
 *
 * When taking this `IfStatement`, returns `consequent;` statement.
 *
 * @param {ASTNode} A node to get.
 * @returns {ASTNode|null} The trailing statement's node.
 */
getTrailingStatement: esutils.ast.trailingStatement,

/**
 * Finds the variable by a given name in a given scope and its upper scopes.
 *
 * @param {escope.Scope} initScope - A scope to start find.
 * @param {string} name - A variable name to find.
 * @returns {escope.Variable|null} A found variable or `null`.
 */
getVariableByName: function(initScope, name) {
    var scope = initScope;

    while (scope) {
        var variable = scope.set.get(name);

        if (variable) {
            return variable;
        }

        scope = scope.upper;
    }

    return null;
},

/**
 * Checks whether or not a given function node is the default `this` binding.
 *
 * First, this checks the node:
 *
 * - The function name does not start with uppercase (it's a constructor).
 * - The function does not have a JSDoc comment that has a @this tag.
 *
 * Next, this checks the location of the node.
 * If the location is below, this judges `this` is valid.
 *
 * - The location is not on an object literal.
 * - The location does not assign to a property.
 * - The location is not on an ES2015 class.
 * - The location does not call its `bind`/`call`/`apply` method directly.
 * - The function is not a callback of array methods (such as `.forEach()`) if `thisArg` is given.
 *
 * @param {ASTNode} node - A function node to check.
 * @param {SourceCode} sourceCode - A SourceCode instance to get comments.
 * @returns {boolean} The function node is the default `this` binding.
 */
isDefaultThisBinding: function(node, sourceCode) {
    if (isES5Constructor(node) || hasJSDocThisTag(node, sourceCode)) {
        return false;
    }

    while (node) {
        var parent = node.parent;

        switch (parent.type) {

            /*
             * Looks up the destination.
             * e.g., obj.foo = nativeFoo || function foo() { ... };
             */
            case "LogicalExpression":
            case "ConditionalExpression":
                node = parent;
                break;

            // If the upper function is IIFE, checks the destination of the return value.
            // e.g.
            //   obj.foo = (function() {
            //     // setup...
            //     return function foo() { ... };
            //   })();
            case "ReturnStatement":
                var func = getUpperFunction(parent);

                if (func === null || !isCallee(func)) {
                    return true;
                }
                node = func.parent;
                break;

            // e.g.
            //   var obj = { foo() { ... } };
            //   var obj = { foo: function() { ... } };
            case "Property":
                return false;

            // e.g.
            //   obj.foo = foo() { ... };
            case "AssignmentExpression":
                return (
                    parent.right !== node ||
                    parent.left.type !== "MemberExpression"
                );

            // e.g.
            //   class A { constructor() { ... } }
            //   class A { foo() { ... } }
            //   class A { get foo() { ... } }
            //   class A { set foo() { ... } }
            //   class A { static foo() { ... } }
            case "MethodDefinition":
                return false;

            // e.g.
            //   var foo = function foo() { ... }.bind(obj);
            //   (function foo() { ... }).call(obj);
            //   (function foo() { ... }).apply(obj, []);
            case "MemberExpression":
                return (
                    parent.object !== node ||
                    parent.property.type !== "Identifier" ||
                    !bindOrCallOrApplyPattern.test(parent.property.name) ||
                    !isCallee(parent) ||
                    parent.parent.arguments.length === 0 ||
                    isNullOrUndefined(parent.parent.arguments[0])
                );

            // e.g.
            //   Reflect.apply(function() {}, obj, []);
            //   Array.from([], function() {}, obj);
            //   list.forEach(function() {}, obj);
            case "CallExpression":
                if (isReflectApply(parent.callee)) {
                    return (
                        parent.arguments.length !== 3 ||
                        parent.arguments[0] !== node ||
                        isNullOrUndefined(parent.arguments[1])
                    );
                }
                if (isArrayFromMethod(parent.callee)) {
                    return (
                        parent.arguments.length !== 3 ||
                        parent.arguments[1] !== node ||
                        isNullOrUndefined(parent.arguments[2])
                    );
                }
                if (isMethodWhichHasThisArg(parent.callee)) {
                    return (
                        parent.arguments.length !== 2 ||
                        parent.arguments[0] !== node ||
                        isNullOrUndefined(parent.arguments[1])
                    );
                }
                return true;

            // Otherwise `this` is default.
            default:
                return true;
        }
    }

    /* istanbul ignore next */
    return true;
},

/**
 * Get the precedence level based on the node type
 * @param {ASTNode} node node to evaluate
 * @returns {int} precedence level
 * @private
 */
getPrecedence: function(node) {
    switch (node.type) {
        case "SequenceExpression":
            return 0;

        case "AssignmentExpression":
        case "ArrowFunctionExpression":
        case "YieldExpression":
            return 1;

        case "ConditionalExpression":
            return 3;

        case "LogicalExpression":
            switch (node.operator) {
                case "||":
                    return 4;
                case "&&":
                    return 5;

                // no default
            }

            /* falls through */

        case "BinaryExpression":

            switch (node.operator) {
                case "|":
                    return 6;
                case "^":
                    return 7;
                case "&":
                    return 8;
                case "==":
                case "!=":
                case "===":
                case "!==":
                    return 9;
                case "<":
                case "<=":
                case ">":
                case ">=":
                case "in":
                case "instanceof":
                    return 10;
                case "<<":
                case ">>":
                case ">>>":
                    return 11;
                case "+":
                case "-":
                    return 12;
                case "*":
                case "/":
                case "%":
                    return 13;

                // no default
            }

            /* falls through */

        case "UnaryExpression":
            return 14;

        case "UpdateExpression":
            return 15;

        case "CallExpression":

            // IIFE is allowed to have parens in any position (#655)
            if (node.callee.type === "FunctionExpression") {
                return -1;
            }
            return 16;

        case "NewExpression":
            return 17;

        // no default
    }
    return 18;
}

};

},{“esutils”:92}],125:[function(require,module,exports){ /**

* @fileoverview A class of the code path analyzer.
* @author Toru Nagashima
*/

“use strict”;

//—————————————————————————— // Requirements //——————————————————————————

var assert = require(“assert”),

CodePath = require("./code-path"),
CodePathSegment = require("./code-path-segment"),
IdGenerator = require("./id-generator"),
debug = require("./debug-helpers"),
astUtils = require("../ast-utils");

//—————————————————————————— // Helpers //——————————————————————————

/**

* Checks whether or not a given node is a `case` node (not `default` node).
*
* @param {ASTNode} node - A `SwitchCase` node to check.
* @returns {boolean} `true` if the node is a `case` node (not `default` node).
*/

function isCaseNode(node) {

return Boolean(node.test);

}

/**

* Checks whether or not a given logical expression node goes different path
* between the `true` case and the `false` case.
*
* @param {ASTNode} node - A node to check.
* @returns {boolean} `true` if the node is a test of a choice statement.
*/

function isForkingByTrueOrFalse(node) {

var parent = node.parent;

switch (parent.type) {
    case "ConditionalExpression":
    case "IfStatement":
    case "WhileStatement":
    case "DoWhileStatement":
    case "ForStatement":
        return parent.test === node;

    case "LogicalExpression":
        return true;

    default:
        return false;
}

}

/**

* Gets the boolean value of a given literal node.
*
* This is used to detect infinity loops (e.g. `while (true) {}`).
* Statements preceded by an infinity loop are unreachable if the loop didn't
* have any `break` statement.
*
* @param {ASTNode} node - A node to get.
* @returns {boolean|undefined} a boolean value if the node is a Literal node,
*   otherwise `undefined`.
*/

function getBooleanValueIfSimpleConstant(node) {

if (node.type === "Literal") {
    return Boolean(node.value);
}
return void 0;

}

/**

* Checks that a given identifier node is a reference or not.
*
* This is used to detect the first throwable node in a `try` block.
*
* @param {ASTNode} node - An Identifier node to check.
* @returns {boolean} `true` if the node is a reference.
*/

function isIdentifierReference(node) {

var parent = node.parent;

switch (parent.type) {
    case "LabeledStatement":
    case "BreakStatement":
    case "ContinueStatement":
    case "ArrayPattern":
    case "RestElement":
    case "ImportSpecifier":
    case "ImportDefaultSpecifier":
    case "ImportNamespaceSpecifier":
    case "CatchClause":
        return false;

    case "FunctionDeclaration":
    case "FunctionExpression":
    case "ArrowFunctionExpression":
    case "ClassDeclaration":
    case "ClassExpression":
    case "VariableDeclarator":
        return parent.id !== node;

    case "Property":
    case "MethodDefinition":
        return (
            parent.key !== node ||
            parent.computed ||
            parent.shorthand
        );

    case "AssignmentPattern":
        return parent.key !== node;

    default:
        return true;
}

}

/**

* Updates the current segment with the head segment.
* This is similar to local branches and tracking branches of git.
*
* To separate the current and the head is in order to not make useless segments.
*
* In this process, both "onCodePathSegmentStart" and "onCodePathSegmentEnd"
* events are fired.
*
* @param {CodePathAnalyzer} analyzer - The instance.
* @param {ASTNode} node - The current AST node.
* @returns {void}
*/

function forwardCurrentToHead(analyzer, node) {

var codePath = analyzer.codePath;
var state = CodePath.getState(codePath);
var currentSegments = state.currentSegments;
var headSegments = state.headSegments;
var end = Math.max(currentSegments.length, headSegments.length);
var i, currentSegment, headSegment;

// Fires leaving events.
for (i = 0; i < end; ++i) {
    currentSegment = currentSegments[i];
    headSegment = headSegments[i];

    if (currentSegment !== headSegment && currentSegment) {
        debug.dump("onCodePathSegmentEnd " + currentSegment.id);

        if (currentSegment.reachable) {
            analyzer.emitter.emit(
                "onCodePathSegmentEnd",
                currentSegment,
                node);
        }
    }
}

// Update state.
state.currentSegments = headSegments;

// Fires entering events.
for (i = 0; i < end; ++i) {
    currentSegment = currentSegments[i];
    headSegment = headSegments[i];

    if (currentSegment !== headSegment && headSegment) {
        debug.dump("onCodePathSegmentStart " + headSegment.id);

        CodePathSegment.markUsed(headSegment);
        if (headSegment.reachable) {
            analyzer.emitter.emit(
                "onCodePathSegmentStart",
                headSegment,
                node);
        }
    }
}

}

/**

* Updates the current segment with empty.
* This is called at the last of functions or the program.
*
* @param {CodePathAnalyzer} analyzer - The instance.
* @param {ASTNode} node - The current AST node.
* @returns {void}
*/

function leaveFromCurrentSegment(analyzer, node) {

var state = CodePath.getState(analyzer.codePath);
var currentSegments = state.currentSegments;

for (var i = 0; i < currentSegments.length; ++i) {
    var currentSegment = currentSegments[i];

    debug.dump("onCodePathSegmentEnd " + currentSegment.id);
    if (currentSegment.reachable) {
        analyzer.emitter.emit(
            "onCodePathSegmentEnd",
            currentSegment,
            node);
    }
}

state.currentSegments = [];

}

/**

* Updates the code path due to the position of a given node in the parent node
* thereof.
*
* For example, if the node is `parent.consequent`, this creates a fork from the
* current path.
*
* @param {CodePathAnalyzer} analyzer - The instance.
* @param {ASTNode} node - The current AST node.
* @returns {void}
*/

function preprocess(analyzer, node) {

var codePath = analyzer.codePath;
var state = CodePath.getState(codePath);
var parent = node.parent;

switch (parent.type) {
    case "LogicalExpression":
        if (parent.right === node) {
            state.makeLogicalRight();
        }
        break;

    case "ConditionalExpression":
    case "IfStatement":

        /*
         * Fork if this node is at `consequent`/`alternate`.
         * `popForkContext()` exists at `IfStatement:exit` and
         * `ConditionalExpression:exit`.
         */
        if (parent.consequent === node) {
            state.makeIfConsequent();
        } else if (parent.alternate === node) {
            state.makeIfAlternate();
        }
        break;

    case "SwitchCase":
        if (parent.consequent[0] === node) {
            state.makeSwitchCaseBody(false, !parent.test);
        }
        break;

    case "TryStatement":
        if (parent.handler === node) {
            state.makeCatchBlock();
        } else if (parent.finalizer === node) {
            state.makeFinallyBlock();
        }
        break;

    case "WhileStatement":
        if (parent.test === node) {
            state.makeWhileTest(getBooleanValueIfSimpleConstant(node));
        } else {
            assert(parent.body === node);
            state.makeWhileBody();
        }
        break;

    case "DoWhileStatement":
        if (parent.body === node) {
            state.makeDoWhileBody();
        } else {
            assert(parent.test === node);
            state.makeDoWhileTest(getBooleanValueIfSimpleConstant(node));
        }
        break;

    case "ForStatement":
        if (parent.test === node) {
            state.makeForTest(getBooleanValueIfSimpleConstant(node));
        } else if (parent.update === node) {
            state.makeForUpdate();
        } else if (parent.body === node) {
            state.makeForBody();
        }
        break;

    case "ForInStatement":
    case "ForOfStatement":
        if (parent.left === node) {
            state.makeForInOfLeft();
        } else if (parent.right === node) {
            state.makeForInOfRight();
        } else {
            assert(parent.body === node);
            state.makeForInOfBody();
        }
        break;

    case "AssignmentPattern":

        /*
         * Fork if this node is at `right`.
         * `left` is executed always, so it uses the current path.
         * `popForkContext()` exists at `AssignmentPattern:exit`.
         */
        if (parent.right === node) {
            state.pushForkContext();
            state.forkBypassPath();
            state.forkPath();
        }
        break;

    default:
        break;
}

}

/**

* Updates the code path due to the type of a given node in entering.
*
* @param {CodePathAnalyzer} analyzer - The instance.
* @param {ASTNode} node - The current AST node.
* @returns {void}
*/

function processCodePathToEnter(analyzer, node) {

var codePath = analyzer.codePath;
var state = codePath && CodePath.getState(codePath);
var parent = node.parent;

switch (node.type) {
    case "Program":
    case "FunctionDeclaration":
    case "FunctionExpression":
    case "ArrowFunctionExpression":
        if (codePath) {

            // Emits onCodePathSegmentStart events if updated.
            forwardCurrentToHead(analyzer, node);
            debug.dumpState(node, state, false);
        }

        // Create the code path of this scope.
        codePath = analyzer.codePath = new CodePath(
            analyzer.idGenerator.next(),
            codePath,
            analyzer.onLooped
        );
        state = CodePath.getState(codePath);

        // Emits onCodePathStart events.
        debug.dump("onCodePathStart " + codePath.id);
        analyzer.emitter.emit("onCodePathStart", codePath, node);
        break;

    case "LogicalExpression":
        state.pushChoiceContext(node.operator, isForkingByTrueOrFalse(node));
        break;

    case "ConditionalExpression":
    case "IfStatement":
        state.pushChoiceContext("test", false);
        break;

    case "SwitchStatement":
        state.pushSwitchContext(
            node.cases.some(isCaseNode),
            astUtils.getLabel(node));
        break;

    case "TryStatement":
        state.pushTryContext(Boolean(node.finalizer));
        break;

    case "SwitchCase":

        /*
         * Fork if this node is after the 2st node in `cases`.
         * It's similar to `else` blocks.
         * The next `test` node is processed in this path.
         */
        if (parent.discriminant !== node && parent.cases[0] !== node) {
            state.forkPath();
        }
        break;

    case "WhileStatement":
    case "DoWhileStatement":
    case "ForStatement":
    case "ForInStatement":
    case "ForOfStatement":
        state.pushLoopContext(node.type, astUtils.getLabel(node));
        break;

    case "LabeledStatement":
        if (!astUtils.isBreakableStatement(node.body)) {
            state.pushBreakContext(false, node.label.name);
        }
        break;

    default:
        break;
}

// Emits onCodePathSegmentStart events if updated.
forwardCurrentToHead(analyzer, node);
debug.dumpState(node, state, false);

}

/**

* Updates the code path due to the type of a given node in leaving.
*
* @param {CodePathAnalyzer} analyzer - The instance.
* @param {ASTNode} node - The current AST node.
* @returns {void}
*/

function processCodePathToExit(analyzer, node) {

var codePath = analyzer.codePath;
var state = CodePath.getState(codePath);
var dontForward = false;

switch (node.type) {
    case "IfStatement":
    case "ConditionalExpression":
    case "LogicalExpression":
        state.popChoiceContext();
        break;

    case "SwitchStatement":
        state.popSwitchContext();
        break;

    case "SwitchCase":

        /*
         * This is the same as the process at the 1st `consequent` node in
         * `preprocess` function.
         * Must do if this `consequent` is empty.
         */
        if (node.consequent.length === 0) {
            state.makeSwitchCaseBody(true, !node.test);
        }
        if (state.forkContext.reachable) {
            dontForward = true;
        }
        break;

    case "TryStatement":
        state.popTryContext();
        break;

    case "BreakStatement":
        forwardCurrentToHead(analyzer, node);
        state.makeBreak(node.label && node.label.name);
        dontForward = true;
        break;

    case "ContinueStatement":
        forwardCurrentToHead(analyzer, node);
        state.makeContinue(node.label && node.label.name);
        dontForward = true;
        break;

    case "ReturnStatement":
        forwardCurrentToHead(analyzer, node);
        state.makeReturn();
        dontForward = true;
        break;

    case "ThrowStatement":
        forwardCurrentToHead(analyzer, node);
        state.makeThrow();
        dontForward = true;
        break;

    case "Identifier":
        if (isIdentifierReference(node)) {
            state.makeFirstThrowablePathInTryBlock();
            dontForward = true;
        }
        break;

    case "CallExpression":
    case "MemberExpression":
    case "NewExpression":
        state.makeFirstThrowablePathInTryBlock();
        break;

    case "WhileStatement":
    case "DoWhileStatement":
    case "ForStatement":
    case "ForInStatement":
    case "ForOfStatement":
        state.popLoopContext();
        break;

    case "AssignmentPattern":
        state.popForkContext();
        break;

    case "LabeledStatement":
        if (!astUtils.isBreakableStatement(node.body)) {
            state.popBreakContext();
        }
        break;

    default:
        break;
}

/*
 * Skip updating the current segment to avoid creating useless segments if
 * the node type is the same as the parent node type.
 */
if (!dontForward && (!node.parent || node.type !== node.parent.type)) {

    // Emits onCodePathSegmentStart events if updated.
    forwardCurrentToHead(analyzer, node);
}
debug.dumpState(node, state, true);

}

/**

* Updates the code path to finalize the current code path.
*
* @param {CodePathAnalyzer} analyzer - The instance.
* @param {ASTNode} node - The current AST node.
* @returns {void}
*/

function postprocess(analyzer, node) {

switch (node.type) {
    case "Program":
    case "FunctionDeclaration":
    case "FunctionExpression":
    case "ArrowFunctionExpression":
        var codePath = analyzer.codePath;

        // Mark the current path as the final node.
        CodePath.getState(codePath).makeFinal();

        // Emits onCodePathSegmentEnd event of the current segments.
        leaveFromCurrentSegment(analyzer, node);

        // Emits onCodePathEnd event of this code path.
        debug.dump("onCodePathEnd " + codePath.id);
        analyzer.emitter.emit("onCodePathEnd", codePath, node);
        debug.dumpDot(codePath);

        codePath = analyzer.codePath = analyzer.codePath.upper;
        if (codePath) {
            debug.dumpState(node, CodePath.getState(codePath), true);
        }
        break;

    default:
        break;
}

}

//—————————————————————————— // Public Interface //——————————————————————————

/**

* The class to analyze code paths.
* This class implements the EventGenerator interface.
*
* @constructor
* @param {EventGenerator} eventGenerator - An event generator to wrap.
*/

function CodePathAnalyzer(eventGenerator) {

this.original = eventGenerator;
this.emitter = eventGenerator.emitter;
this.codePath = null;
this.idGenerator = new IdGenerator("s");
this.currentNode = null;
this.onLooped = this.onLooped.bind(this);

}

CodePathAnalyzer.prototype = {

constructor: CodePathAnalyzer,

/**
 * Does the process to enter a given AST node.
 * This updates state of analysis and calls `enterNode` of the wrapped.
 *
 * @param {ASTNode} node - A node which is entering.
 * @returns {void}
 */
enterNode: function(node) {
    this.currentNode = node;

    // Updates the code path due to node's position in its parent node.
    if (node.parent) {
        preprocess(this, node);
    }

    // Updates the code path.
    // And emits onCodePathStart/onCodePathSegmentStart events.
    processCodePathToEnter(this, node);

    // Emits node events.
    this.original.enterNode(node);

    this.currentNode = null;
},

/**
 * Does the process to leave a given AST node.
 * This updates state of analysis and calls `leaveNode` of the wrapped.
 *
 * @param {ASTNode} node - A node which is leaving.
 * @returns {void}
 */
leaveNode: function(node) {
    this.currentNode = node;

    // Updates the code path.
    // And emits onCodePathStart/onCodePathSegmentStart events.
    processCodePathToExit(this, node);

    // Emits node events.
    this.original.leaveNode(node);

    // Emits the last onCodePathStart/onCodePathSegmentStart events.
    postprocess(this, node);

    this.currentNode = null;
},

/**
 * This is called on a code path looped.
 * Then this raises a looped event.
 *
 * @param {CodePathSegment} fromSegment - A segment of prev.
 * @param {CodePathSegment} toSegment - A segment of next.
 * @returns {void}
 */
onLooped: function(fromSegment, toSegment) {
    if (fromSegment.reachable && toSegment.reachable) {
        debug.dump("onCodePathSegmentLoop " + fromSegment.id + " -> " + toSegment.id);
        this.emitter.emit(
            "onCodePathSegmentLoop",
            fromSegment,
            toSegment,
            this.currentNode
        );
    }
}

};

module.exports = CodePathAnalyzer;

},{“../ast-utils”:124,“./code-path”:128,“./code-path-segment”:126,“./debug-helpers”:129,“./id-generator”:131,“assert”:5}],126:[function(require,module,exports){ /**

* @fileoverview A class of the code path segment.
* @author Toru Nagashima
*/

“use strict”;

//—————————————————————————— // Requirements //——————————————————————————

var debug = require(“./debug-helpers”);

//—————————————————————————— // Helpers //——————————————————————————

/**

* Replaces unused segments with the previous segments of each unused segment.
*
* @param {CodePathSegment[]} segments - An array of segments to replace.
* @returns {CodePathSegment[]} The replaced array.
*/

function flattenUnusedSegments(segments) {

var done = Object.create(null);
var retv = [];

for (var i = 0; i < segments.length; ++i) {
    var segment = segments[i];

    // Ignores duplicated.
    if (done[segment.id]) {
        continue;
    }

    // Use previous segments if unused.
    if (!segment.internal.used) {
        for (var j = 0; j < segment.allPrevSegments.length; ++j) {
            var prevSegment = segment.allPrevSegments[j];

            if (!done[prevSegment.id]) {
                done[prevSegment.id] = true;
                retv.push(prevSegment);
            }
        }
    } else {
        done[segment.id] = true;
        retv.push(segment);
    }
}

return retv;

}

/**

* Checks whether or not a given segment is reachable.
*
* @param {CodePathSegment} segment - A segment to check.
* @returns {boolean} `true` if the segment is reachable.
*/

function isReachable(segment) {

return segment.reachable;

}

//—————————————————————————— // Public Interface //——————————————————————————

/**

* A code path segment.
*
* @constructor
* @param {string} id - An identifier.
* @param {CodePathSegment[]} allPrevSegments - An array of the previous segments.
*   This array includes unreachable segments.
* @param {boolean} reachable - A flag which shows this is reachable.
*/

function CodePathSegment(id, allPrevSegments, reachable) {

/**
 * The identifier of this code path.
 * Rules use it to store additional information of each rule.
 * @type {string}
 */
this.id = id;

/**
 * An array of the next segments.
 * @type {CodePathSegment[]}
 */
this.nextSegments = [];

/**
 * An array of the previous segments.
 * @type {CodePathSegment[]}
 */
this.prevSegments = allPrevSegments.filter(isReachable);

/**
 * An array of the next segments.
 * This array includes unreachable segments.
 * @type {CodePathSegment[]}
 */
this.allNextSegments = [];

/**
 * An array of the previous segments.
 * This array includes unreachable segments.
 * @type {CodePathSegment[]}
 */
this.allPrevSegments = allPrevSegments;

/**
 * A flag which shows this is reachable.
 * @type {boolean}
 */
this.reachable = reachable;

// Internal data.
Object.defineProperty(this, "internal", {value: {
    used: false,
    loopedPrevSegments: []
}});

/* istanbul ignore if */
if (debug.enabled) {
    this.internal.nodes = [];
    this.internal.exitNodes = [];
}

}

CodePathSegment.prototype = {

constructor: CodePathSegment,

/**
 * Checks a given previous segment is coming from the end of a loop.
 *
 * @param {CodePathSegment} segment - A previous segment to check.
 * @returns {boolean} `true` if the segment is coming from the end of a loop.
 */
isLoopedPrevSegment: function(segment) {
    return this.internal.loopedPrevSegments.indexOf(segment) !== -1;
}

};

/**

* Creates the root segment.
*
* @param {string} id - An identifier.
* @returns {CodePathSegment} The created segment.
*/

CodePathSegment.newRoot = function(id) {

return new CodePathSegment(id, [], true);

};

/**

* Creates a segment that follows given segments.
*
* @param {string} id - An identifier.
* @param {CodePathSegment[]} allPrevSegments - An array of the previous segments.
* @returns {CodePathSegment} The created segment.
*/

CodePathSegment.newNext = function(id, allPrevSegments) {

return new CodePathSegment(
    id,
    flattenUnusedSegments(allPrevSegments),
    allPrevSegments.some(isReachable));

};

/**

* Creates an unreachable segment that follows given segments.
*
* @param {string} id - An identifier.
* @param {CodePathSegment[]} allPrevSegments - An array of the previous segments.
* @returns {CodePathSegment} The created segment.
*/

CodePathSegment.newUnreachable = function(id, allPrevSegments) {

var segment = new CodePathSegment(id, flattenUnusedSegments(allPrevSegments), false);

// In `if (a) return a; foo();` case, the unreachable segment preceded by
// the return statement is not used but must not be remove.
CodePathSegment.markUsed(segment);

return segment;

};

/**

* Creates a segment that follows given segments.
* This factory method does not connect with `allPrevSegments`.
* But this inherits `reachable` flag.
*
* @param {string} id - An identifier.
* @param {CodePathSegment[]} allPrevSegments - An array of the previous segments.
* @returns {CodePathSegment} The created segment.
*/

CodePathSegment.newDisconnected = function(id, allPrevSegments) {

return new CodePathSegment(id, [], allPrevSegments.some(isReachable));

};

/**

* Makes a given segment being used.
*
* And this function registers the segment into the previous segments as a next.
*
* @param {CodePathSegment} segment - A segment to mark.
* @returns {void}
*/

CodePathSegment.markUsed = function(segment) {

if (segment.internal.used) {
    return;
}
segment.internal.used = true;

var i;

if (segment.reachable) {
    for (i = 0; i < segment.allPrevSegments.length; ++i) {
        var prevSegment = segment.allPrevSegments[i];

        prevSegment.allNextSegments.push(segment);
        prevSegment.nextSegments.push(segment);
    }
} else {
    for (i = 0; i < segment.allPrevSegments.length; ++i) {
        segment.allPrevSegments[i].allNextSegments.push(segment);
    }
}

};

/**

* Marks a previous segment as looped.
*
* @param {CodePathSegment} segment - A segment.
* @param {CodePathSegment} prevSegment - A previous segment to mark.
* @returns {void}
*/

CodePathSegment.markPrevSegmentAsLooped = function(segment, prevSegment) {

segment.internal.loopedPrevSegments.push(prevSegment);

};

module.exports = CodePathSegment;

},{“./debug-helpers”:129}],127:[function(require,module,exports){ /**

* @fileoverview A class to manage state of generating a code path.
* @author Toru Nagashima
*/

“use strict”;

//—————————————————————————— // Requirements //——————————————————————————

var CodePathSegment = require(“./code-path-segment”),

ForkContext = require("./fork-context");

//—————————————————————————— // Helpers //——————————————————————————

/**

* Adds given segments into the `dest` array.
* If the `others` array does not includes the given segments, adds to the `all`
* array as well.
*
* This adds only reachable and used segments.
*
* @param {CodePathSegment[]} dest - A destination array (`returnedSegments` or `thrownSegments`).
* @param {CodePathSegment[]} others - Another destination array (`returnedSegments` or `thrownSegments`).
* @param {CodePathSegment[]} all - The unified destination array (`finalSegments`).
* @param {CodePathSegment[]} segments - Segments to add.
* @returns {void}
*/

function addToReturnedOrThrown(dest, others, all, segments) {

for (var i = 0; i < segments.length; ++i) {
    var segment = segments[i];

    dest.push(segment);
    if (others.indexOf(segment) === -1) {
        all.push(segment);
    }
}

}

/**

* Gets a loop-context for a `continue` statement.
*
* @param {CodePathState} state - A state to get.
* @param {string} label - The label of a `continue` statement.
* @returns {LoopContext} A loop-context for a `continue` statement.
*/

function getContinueContext(state, label) {

if (!label) {
    return state.loopContext;
}

var context = state.loopContext;

while (context) {
    if (context.label === label) {
        return context;
    }
    context = context.upper;
}

/* istanbul ignore next: foolproof (syntax error) */
return null;

}

/**

* Gets a context for a `break` statement.
*
* @param {CodePathState} state - A state to get.
* @param {string} label - The label of a `break` statement.
* @returns {LoopContext|SwitchContext} A context for a `break` statement.
*/

function getBreakContext(state, label) {

var context = state.breakContext;

while (context) {
    if (label ? context.label === label : context.breakable) {
        return context;
    }
    context = context.upper;
}

/* istanbul ignore next: foolproof (syntax error) */
return null;

}

/**

* Gets a context for a `return` statement.
*
* @param {CodePathState} state - A state to get.
* @returns {TryContext|CodePathState} A context for a `return` statement.
*/

function getReturnContext(state) {

var context = state.tryContext;

while (context) {
    if (context.hasFinalizer && context.position !== "finally") {
        return context;
    }
    context = context.upper;
}

return state;

}

/**

* Gets a context for a `throw` statement.
*
* @param {CodePathState} state - A state to get.
* @returns {TryContext|CodePathState} A context for a `throw` statement.
*/

function getThrowContext(state) {

var context = state.tryContext;

while (context) {
    if (context.position === "try" ||
        (context.hasFinalizer && context.position === "catch")
    ) {
        return context;
    }
    context = context.upper;
}

return state;

}

/**

* Removes a given element from a given array.
*
* @param {any[]} xs - An array to remove the specific element.
* @param {any} x - An element to be removed.
* @returns {void}
*/

function remove(xs, x) {

xs.splice(xs.indexOf(x), 1);

}

/**

* Disconnect given segments.
*
* This is used in a process for switch statements.
* If there is the "default" chunk before other cases, the order is different
* between node's and running's.
*
* @param {CodePathSegment[]} prevSegments - Forward segments to disconnect.
* @param {CodePathSegment[]} nextSegments - Backward segments to disconnect.
* @returns {void}
*/

function removeConnection(prevSegments, nextSegments) {

for (var i = 0; i < prevSegments.length; ++i) {
    var prevSegment = prevSegments[i];
    var nextSegment = nextSegments[i];

    remove(prevSegment.nextSegments, nextSegment);
    remove(prevSegment.allNextSegments, nextSegment);
    remove(nextSegment.prevSegments, prevSegment);
    remove(nextSegment.allPrevSegments, prevSegment);
}

}

/**

* Creates looping path.
*
* @param {CodePathState} state - The instance.
* @param {CodePathSegment[]} fromSegments - Segments which are source.
* @param {CodePathSegment[]} toSegments - Segments which are destination.
* @returns {void}
*/

function makeLooped(state, fromSegments, toSegments) {

var end = Math.min(fromSegments.length, toSegments.length);

for (var i = 0; i < end; ++i) {
    var fromSegment = fromSegments[i];
    var toSegment = toSegments[i];

    if (toSegment.reachable) {
        fromSegment.nextSegments.push(toSegment);
    }
    if (fromSegment.reachable) {
        toSegment.prevSegments.push(fromSegment);
    }
    fromSegment.allNextSegments.push(toSegment);
    toSegment.allPrevSegments.push(fromSegment);

    if (toSegment.allPrevSegments.length >= 2) {
        CodePathSegment.markPrevSegmentAsLooped(toSegment, fromSegment);
    }

    state.notifyLooped(fromSegment, toSegment);
}

}

/**

* Finalizes segments of `test` chunk of a ForStatement.
*
* - Adds `false` paths to paths which are leaving from the loop.
* - Sets `true` paths to paths which go to the body.
*
* @param {LoopContext} context - A loop context to modify.
* @param {ChoiceContext} choiceContext - A choice context of this loop.
* @param {CodePathSegment[]} head - The current head paths.
* @returns {void}
*/

function finalizeTestSegmentsOfFor(context, choiceContext, head) {

if (!choiceContext.processed) {
    choiceContext.trueForkContext.add(head);
    choiceContext.falseForkContext.add(head);
}

if (context.test !== true) {
    context.brokenForkContext.addAll(choiceContext.falseForkContext);
}
context.endOfTestSegments = choiceContext.trueForkContext.makeNext(0, -1);

}

//—————————————————————————— // Public Interface //——————————————————————————

/**

* A class which manages state to analyze code paths.
*
* @constructor
* @param {IdGenerator} idGenerator - An id generator to generate id for code
*   path segments.
* @param {function} onLooped - A callback function to notify looping.
*/

function CodePathState(idGenerator, onLooped) {

this.idGenerator = idGenerator;
this.notifyLooped = onLooped;
this.forkContext = ForkContext.newRoot(idGenerator);
this.choiceContext = null;
this.switchContext = null;
this.tryContext = null;
this.loopContext = null;
this.breakContext = null;

this.currentSegments = [];
this.initialSegment = this.forkContext.head[0];

// returnedSegments and thrownSegments push elements into finalSegments also.
var final = this.finalSegments = [];
var returned = this.returnedForkContext = [];
var thrown = this.thrownForkContext = [];

returned.add = addToReturnedOrThrown.bind(null, returned, thrown, final);
thrown.add = addToReturnedOrThrown.bind(null, thrown, returned, final);

}

CodePathState.prototype = {

constructor: CodePathState,

/**
 * The head segments.
 * @type {CodePathSegment[]}
 */
get headSegments() {
    return this.forkContext.head;
},

/**
 * The parent forking context.
 * This is used for the root of new forks.
 * @type {ForkContext}
 */
get parentForkContext() {
    var current = this.forkContext;

    return current && current.upper;
},

/**
 * Creates and stacks new forking context.
 *
 * @param {boolean} forkLeavingPath - A flag which shows being in a
 *   "finally" block.
 * @returns {ForkContext} The created context.
 */
pushForkContext: function(forkLeavingPath) {
    this.forkContext = ForkContext.newEmpty(
        this.forkContext,
        forkLeavingPath
    );

    return this.forkContext;
},

/**
 * Pops and merges the last forking context.
 * @returns {ForkContext} The last context.
 */
popForkContext: function() {
    var lastContext = this.forkContext;

    this.forkContext = lastContext.upper;
    this.forkContext.replaceHead(lastContext.makeNext(0, -1));

    return lastContext;
},

/**
 * Creates a new path.
 * @returns {void}
 */
forkPath: function() {
    this.forkContext.add(this.parentForkContext.makeNext(-1, -1));
},

/**
 * Creates a bypass path.
 * This is used for such as IfStatement which does not have "else" chunk.
 *
 * @returns {void}
 */
forkBypassPath: function() {
    this.forkContext.add(this.parentForkContext.head);
},

//--------------------------------------------------------------------------
// ConditionalExpression, LogicalExpression, IfStatement
//--------------------------------------------------------------------------

/**
 * Creates a context for ConditionalExpression, LogicalExpression,
 * IfStatement, WhileStatement, DoWhileStatement, or ForStatement.
 *
 * LogicalExpressions have cases that it goes different paths between the
 * `true` case and the `false` case.
 *
 * For Example:
 *
 *     if (a || b) {
 *         foo();
 *     } else {
 *         bar();
 *     }
 *
 * In this case, `b` is evaluated always in the code path of the `else`
 * block, but it's not so in the code path of the `if` block.
 * So there are 3 paths.
 *
 *     a -> foo();
 *     a -> b -> foo();
 *     a -> b -> bar();
 *
 * @param {string} kind - A kind string.
 *   If the new context is LogicalExpression's, this is `"&&"` or `"||"`.
 *   If it's IfStatement's or ConditionalExpression's, this is `"test"`.
 *   Otherwise, this is `"loop"`.
 * @param {boolean} isForkingAsResult - A flag that shows that goes different
 *   paths between `true` and `false`.
 * @returns {void}
 */
pushChoiceContext: function(kind, isForkingAsResult) {
    this.choiceContext = {
        upper: this.choiceContext,
        kind: kind,
        isForkingAsResult: isForkingAsResult,
        trueForkContext: ForkContext.newEmpty(this.forkContext),
        falseForkContext: ForkContext.newEmpty(this.forkContext),
        processed: false
    };
},

/**
 * Pops the last choice context and finalizes it.
 *
 * @returns {ChoiceContext} The popped context.
 */
popChoiceContext: function() {
    var context = this.choiceContext;

    this.choiceContext = context.upper;

    var forkContext = this.forkContext;
    var headSegments = forkContext.head;

    switch (context.kind) {
        case "&&":
        case "||":

            /*
             * If any result were not transferred from child contexts,
             * this sets the head segments to both cases.
             * The head segments are the path of the right-hand operand.
             */
            if (!context.processed) {
                context.trueForkContext.add(headSegments);
                context.falseForkContext.add(headSegments);
            }

            /*
             * Transfers results to upper context if this context is in
             * test chunk.
             */
            if (context.isForkingAsResult) {
                var parentContext = this.choiceContext;

                parentContext.trueForkContext.addAll(context.trueForkContext);
                parentContext.falseForkContext.addAll(context.falseForkContext);
                parentContext.processed = true;

                return context;
            }

            break;

        case "test":
            if (!context.processed) {

                /*
                 * The head segments are the path of the `if` block here.
                 * Updates the `true` path with the end of the `if` block.
                 */
                context.trueForkContext.clear();
                context.trueForkContext.add(headSegments);
            } else {

                /*
                 * The head segments are the path of the `else` block here.
                 * Updates the `false` path with the end of the `else`
                 * block.
                 */
                context.falseForkContext.clear();
                context.falseForkContext.add(headSegments);
            }

            break;

        case "loop":

            /*
             * Loops are addressed in popLoopContext().
             * This is called from popLoopContext().
             */
            return context;

        /* istanbul ignore next */
        default:
            throw new Error("unreachable");
    }

    // Merges all paths.
    var prevForkContext = context.trueForkContext;

    prevForkContext.addAll(context.falseForkContext);
    forkContext.replaceHead(prevForkContext.makeNext(0, -1));

    return context;
},

/**
 * Makes a code path segment of the right-hand operand of a logical
 * expression.
 *
 * @returns {void}
 */
makeLogicalRight: function() {
    var context = this.choiceContext;
    var forkContext = this.forkContext;

    if (context.processed) {

        /*
         * This got segments already from the child choice context.
         * Creates the next path from own true/false fork context.
         */
        var prevForkContext =
            context.kind === "&&" ? context.trueForkContext :
            /* kind === "||" */ context.falseForkContext;

        forkContext.replaceHead(prevForkContext.makeNext(0, -1));
        prevForkContext.clear();

        context.processed = false;
    } else {

        /*
         * This did not get segments from the child choice context.
         * So addresses the head segments.
         * The head segments are the path of the left-hand operand.
         */
        if (context.kind === "&&") {

            // The path does short-circuit if false.
            context.falseForkContext.add(forkContext.head);
        } else {

            // The path does short-circuit if true.
            context.trueForkContext.add(forkContext.head);
        }

        forkContext.replaceHead(forkContext.makeNext(-1, -1));
    }
},

/**
 * Makes a code path segment of the `if` block.
 *
 * @returns {void}
 */
makeIfConsequent: function() {
    var context = this.choiceContext;
    var forkContext = this.forkContext;

    /*
     * If any result were not transferred from child contexts,
     * this sets the head segments to both cases.
     * The head segments are the path of the test expression.
     */
    if (!context.processed) {
        context.trueForkContext.add(forkContext.head);
        context.falseForkContext.add(forkContext.head);
    }

    context.processed = false;

    // Creates new path from the `true` case.
    forkContext.replaceHead(
        context.trueForkContext.makeNext(0, -1)
    );
},

/**
 * Makes a code path segment of the `else` block.
 *
 * @returns {void}
 */
makeIfAlternate: function() {
    var context = this.choiceContext;
    var forkContext = this.forkContext;

    /*
     * The head segments are the path of the `if` block.
     * Updates the `true` path with the end of the `if` block.
     */
    context.trueForkContext.clear();
    context.trueForkContext.add(forkContext.head);
    context.processed = true;

    // Creates new path from the `false` case.
    forkContext.replaceHead(
        context.falseForkContext.makeNext(0, -1)
    );
},

//--------------------------------------------------------------------------
// SwitchStatement
//--------------------------------------------------------------------------

/**
 * Creates a context object of SwitchStatement and stacks it.
 *
 * @param {boolean} hasCase - `true` if the switch statement has one or more
 *   case parts.
 * @param {string|null} label - The label text.
 * @returns {void}
 */
pushSwitchContext: function(hasCase, label) {
    this.switchContext = {
        upper: this.switchContext,
        hasCase: hasCase,
        defaultSegments: null,
        defaultBodySegments: null,
        foundDefault: false,
        lastIsDefault: false,
        countForks: 0
    };

    this.pushBreakContext(true, label);
},

/**
 * Pops the last context of SwitchStatement and finalizes it.
 *
 * - Disposes all forking stack for `case` and `default`.
 * - Creates the next code path segment from `context.brokenForkContext`.
 * - If the last `SwitchCase` node is not a `default` part, creates a path
 *   to the `default` body.
 *
 * @returns {void}
 */
popSwitchContext: function() {
    var context = this.switchContext;

    this.switchContext = context.upper;

    var forkContext = this.forkContext;
    var brokenForkContext = this.popBreakContext().brokenForkContext;

    if (context.countForks === 0) {

        /*
         * When there is only one `default` chunk and there is one or more
         * `break` statements, even if forks are nothing, it needs to merge
         * those.
         */
        if (!brokenForkContext.empty) {
            brokenForkContext.add(forkContext.makeNext(-1, -1));
            forkContext.replaceHead(brokenForkContext.makeNext(0, -1));
        }

        return;
    }

    var lastSegments = forkContext.head;

    this.forkBypassPath();
    var lastCaseSegments = forkContext.head;

    /*
     * `brokenForkContext` is used to make the next segment.
     * It must add the last segment into `brokenForkContext`.
     */
    brokenForkContext.add(lastSegments);

    /*
     * A path which is failed in all case test should be connected to path
     * of `default` chunk.
     */
    if (!context.lastIsDefault) {
        if (context.defaultBodySegments) {

            /*
             * Remove a link from `default` label to its chunk.
             * It's false route.
             */
            removeConnection(context.defaultSegments, context.defaultBodySegments);
            makeLooped(this, lastCaseSegments, context.defaultBodySegments);
        } else {

            /*
             * It handles the last case body as broken if `default` chunk
             * does not exist.
             */
            brokenForkContext.add(lastCaseSegments);
        }
    }

    // Pops the segment context stack until the entry segment.
    for (var i = 0; i < context.countForks; ++i) {
        this.forkContext = this.forkContext.upper;
    }

    /*
     * Creates a path from all brokenForkContext paths.
     * This is a path after switch statement.
     */
    this.forkContext.replaceHead(brokenForkContext.makeNext(0, -1));
},

/**
 * Makes a code path segment for a `SwitchCase` node.
 *
 * @param {boolean} isEmpty - `true` if the body is empty.
 * @param {boolean} isDefault - `true` if the body is the default case.
 * @returns {void}
 */
makeSwitchCaseBody: function(isEmpty, isDefault) {
    var context = this.switchContext;

    if (!context.hasCase) {
        return;
    }

    /*
     * Merge forks.
     * The parent fork context has two segments.
     * Those are from the current case and the body of the previous case.
     */
    var parentForkContext = this.forkContext;
    var forkContext = this.pushForkContext();

    forkContext.add(parentForkContext.makeNext(0, -1));

    /*
     * Save `default` chunk info.
     * If the `default` label is not at the last, we must make a path from
     * the last `case` to the `default` chunk.
     */
    if (isDefault) {
        context.defaultSegments = parentForkContext.head;
        if (isEmpty) {
            context.foundDefault = true;
        } else {
            context.defaultBodySegments = forkContext.head;
        }
    } else {
        if (!isEmpty && context.foundDefault) {
            context.foundDefault = false;
            context.defaultBodySegments = forkContext.head;
        }
    }

    context.lastIsDefault = isDefault;
    context.countForks += 1;
},

//--------------------------------------------------------------------------
// TryStatement
//--------------------------------------------------------------------------

/**
 * Creates a context object of TryStatement and stacks it.
 *
 * @param {boolean} hasFinalizer - `true` if the try statement has a
 *   `finally` block.
 * @returns {void}
 */
pushTryContext: function(hasFinalizer) {
    this.tryContext = {
        upper: this.tryContext,
        position: "try",
        hasFinalizer: hasFinalizer,

        returnedForkContext: hasFinalizer
            ? ForkContext.newEmpty(this.forkContext)
            : null,

        thrownForkContext: ForkContext.newEmpty(this.forkContext),
        lastOfTryIsReachable: false,
        lastOfCatchIsReachable: false
    };
},

/**
 * Pops the last context of TryStatement and finalizes it.
 *
 * @returns {void}
 */
popTryContext: function() {
    var context = this.tryContext;

    this.tryContext = context.upper;

    if (context.position === "catch") {

        // Merges two paths from the `try` block and `catch` block merely.
        this.popForkContext();
        return;
    }

    /*
     * The following process is executed only when there is the `finally`
     * block.
     */

    var returned = context.returnedForkContext;
    var thrown = context.thrownForkContext;

    if (returned.empty && thrown.empty) {
        return;
    }

    // Separate head to normal paths and leaving paths.
    var headSegments = this.forkContext.head;

    this.forkContext = this.forkContext.upper;
    var normalSegments = headSegments.slice(0, headSegments.length / 2 | 0);
    var leavingSegments = headSegments.slice(headSegments.length / 2 | 0);

    // Forwards the leaving path to upper contexts.
    if (!returned.empty) {
        getReturnContext(this).returnedForkContext.add(leavingSegments);
    }
    if (!thrown.empty) {
        getThrowContext(this).thrownForkContext.add(leavingSegments);
    }

    // Sets the normal path as the next.
    this.forkContext.replaceHead(normalSegments);

    // If both paths of the `try` block and the `catch` block are
    // unreachable, the next path becomes unreachable as well.
    if (!context.lastOfTryIsReachable && !context.lastOfCatchIsReachable) {
        this.forkContext.makeUnreachable();
    }
},

/**
 * Makes a code path segment for a `catch` block.
 *
 * @returns {void}
 */
makeCatchBlock: function() {
    var context = this.tryContext;
    var forkContext = this.forkContext;
    var thrown = context.thrownForkContext;

    // Update state.
    context.position = "catch";
    context.thrownForkContext = ForkContext.newEmpty(forkContext);
    context.lastOfTryIsReachable = forkContext.reachable;

    // Merge thrown paths.
    thrown.add(forkContext.head);
    var thrownSegments = thrown.makeNext(0, -1);

    // Fork to a bypass and the merged thrown path.
    this.pushForkContext();
    this.forkBypassPath();
    this.forkContext.add(thrownSegments);
},

/**
 * Makes a code path segment for a `finally` block.
 *
 * In the `finally` block, parallel paths are created. The parallel paths
 * are used as leaving-paths. The leaving-paths are paths from `return`
 * statements and `throw` statements in a `try` block or a `catch` block.
 *
 * @returns {void}
 */
makeFinallyBlock: function() {
    var context = this.tryContext;
    var forkContext = this.forkContext;
    var returned = context.returnedForkContext;
    var thrown = context.thrownForkContext;
    var headOfLeavingSegments = forkContext.head;

    // Update state.
    if (context.position === "catch") {

        // Merges two paths from the `try` block and `catch` block.
        this.popForkContext();
        forkContext = this.forkContext;

        context.lastOfCatchIsReachable = forkContext.reachable;
    } else {
        context.lastOfTryIsReachable = forkContext.reachable;
    }
    context.position = "finally";

    if (returned.empty && thrown.empty) {

        // This path does not leave.
        return;
    }

    /*
     * Create a parallel segment from merging returned and thrown.
     * This segment will leave at the end of this finally block.
     */
    var segments = forkContext.makeNext(-1, -1);
    var j;

    for (var i = 0; i < forkContext.count; ++i) {
        var prevSegsOfLeavingSegment = [headOfLeavingSegments[i]];

        for (j = 0; j < returned.segmentsList.length; ++j) {
            prevSegsOfLeavingSegment.push(returned.segmentsList[j][i]);
        }
        for (j = 0; j < thrown.segmentsList.length; ++j) {
            prevSegsOfLeavingSegment.push(thrown.segmentsList[j][i]);
        }

        segments.push(CodePathSegment.newNext(
            this.idGenerator.next(),
            prevSegsOfLeavingSegment));
    }

    this.pushForkContext(true);
    this.forkContext.add(segments);
},

/**
 * Makes a code path segment from the first throwable node to the `catch`
 * block or the `finally` block.
 *
 * @returns {void}
 */
makeFirstThrowablePathInTryBlock: function() {
    var forkContext = this.forkContext;

    if (!forkContext.reachable) {
        return;
    }

    var context = getThrowContext(this);

    if (context === this ||
        context.position !== "try" ||
        !context.thrownForkContext.empty
    ) {
        return;
    }

    context.thrownForkContext.add(forkContext.head);
    forkContext.replaceHead(forkContext.makeNext(-1, -1));
},

//--------------------------------------------------------------------------
// Loop Statements
//--------------------------------------------------------------------------

/**
 * Creates a context object of a loop statement and stacks it.
 *
 * @param {string} type - The type of the node which was triggered. One of
 *   `WhileStatement`, `DoWhileStatement`, `ForStatement`, `ForInStatement`,
 *   and `ForStatement`.
 * @param {string|null} label - A label of the node which was triggered.
 * @returns {void}
 */
pushLoopContext: function(type, label) {
    var forkContext = this.forkContext;
    var breakContext = this.pushBreakContext(true, label);

    switch (type) {
        case "WhileStatement":
            this.pushChoiceContext("loop", false);
            this.loopContext = {
                upper: this.loopContext,
                type: type,
                label: label,
                test: void 0,
                continueDestSegments: null,
                brokenForkContext: breakContext.brokenForkContext
            };
            break;

        case "DoWhileStatement":
            this.pushChoiceContext("loop", false);
            this.loopContext = {
                upper: this.loopContext,
                type: type,
                label: label,
                test: void 0,
                entrySegments: null,
                continueForkContext: ForkContext.newEmpty(forkContext),
                brokenForkContext: breakContext.brokenForkContext
            };
            break;

        case "ForStatement":
            this.pushChoiceContext("loop", false);
            this.loopContext = {
                upper: this.loopContext,
                type: type,
                label: label,
                test: void 0,
                endOfInitSegments: null,
                testSegments: null,
                endOfTestSegments: null,
                updateSegments: null,
                endOfUpdateSegments: null,
                continueDestSegments: null,
                brokenForkContext: breakContext.brokenForkContext
            };
            break;

        case "ForInStatement":
        case "ForOfStatement":
            this.loopContext = {
                upper: this.loopContext,
                type: type,
                label: label,
                prevSegments: null,
                leftSegments: null,
                endOfLeftSegments: null,
                continueDestSegments: null,
                brokenForkContext: breakContext.brokenForkContext
            };
            break;

        /* istanbul ignore next */
        default:
            throw new Error("unknown type: \"" + type + "\"");
    }
},

/**
 * Pops the last context of a loop statement and finalizes it.
 *
 * @returns {void}
 */
popLoopContext: function() {
    var context = this.loopContext;

    this.loopContext = context.upper;

    var forkContext = this.forkContext;
    var brokenForkContext = this.popBreakContext().brokenForkContext;
    var choiceContext;

    // Creates a looped path.
    switch (context.type) {
        case "WhileStatement":
        case "ForStatement":
            choiceContext = this.popChoiceContext();
            makeLooped(
                this,
                forkContext.head,
                context.continueDestSegments);
            break;

        case "DoWhileStatement":
            choiceContext = this.popChoiceContext();

            if (!choiceContext.processed) {
                choiceContext.trueForkContext.add(forkContext.head);
                choiceContext.falseForkContext.add(forkContext.head);
            }
            if (context.test !== true) {
                brokenForkContext.addAll(choiceContext.falseForkContext);
            }

            // `true` paths go to looping.
            var segmentsList = choiceContext.trueForkContext.segmentsList;

            for (var i = 0; i < segmentsList.length; ++i) {
                makeLooped(
                    this,
                    segmentsList[i],
                    context.entrySegments);
            }
            break;

        case "ForInStatement":
        case "ForOfStatement":
            brokenForkContext.add(forkContext.head);
            makeLooped(
                this,
                forkContext.head,
                context.leftSegments);
            break;

        /* istanbul ignore next */
        default:
            throw new Error("unreachable");
    }

    // Go next.
    if (brokenForkContext.empty) {
        forkContext.replaceHead(forkContext.makeUnreachable(-1, -1));
    } else {
        forkContext.replaceHead(brokenForkContext.makeNext(0, -1));
    }
},

/**
 * Makes a code path segment for the test part of a WhileStatement.
 *
 * @param {boolean|undefined} test - The test value (only when constant).
 * @returns {void}
 */
makeWhileTest: function(test) {
    var context = this.loopContext;
    var forkContext = this.forkContext;
    var testSegments = forkContext.makeNext(0, -1);

    // Update state.
    context.test = test;
    context.continueDestSegments = testSegments;
    forkContext.replaceHead(testSegments);
},

/**
 * Makes a code path segment for the body part of a WhileStatement.
 *
 * @returns {void}
 */
makeWhileBody: function() {
    var context = this.loopContext;
    var choiceContext = this.choiceContext;
    var forkContext = this.forkContext;

    if (!choiceContext.processed) {
        choiceContext.trueForkContext.add(forkContext.head);
        choiceContext.falseForkContext.add(forkContext.head);
    }

    // Update state.
    if (context.test !== true) {
        context.brokenForkContext.addAll(choiceContext.falseForkContext);
    }
    forkContext.replaceHead(choiceContext.trueForkContext.makeNext(0, -1));
},

/**
 * Makes a code path segment for the body part of a DoWhileStatement.
 *
 * @returns {void}
 */
makeDoWhileBody: function() {
    var context = this.loopContext;
    var forkContext = this.forkContext;
    var bodySegments = forkContext.makeNext(-1, -1);

    // Update state.
    context.entrySegments = bodySegments;
    forkContext.replaceHead(bodySegments);
},

/**
 * Makes a code path segment for the test part of a DoWhileStatement.
 *
 * @param {boolean|undefined} test - The test value (only when constant).
 * @returns {void}
 */
makeDoWhileTest: function(test) {
    var context = this.loopContext;
    var forkContext = this.forkContext;

    context.test = test;

    // Creates paths of `continue` statements.
    if (!context.continueForkContext.empty) {
        context.continueForkContext.add(forkContext.head);
        var testSegments = context.continueForkContext.makeNext(0, -1);

        forkContext.replaceHead(testSegments);
    }
},

/**
 * Makes a code path segment for the test part of a ForStatement.
 *
 * @param {boolean|undefined} test - The test value (only when constant).
 * @returns {void}
 */
makeForTest: function(test) {
    var context = this.loopContext;
    var forkContext = this.forkContext;
    var endOfInitSegments = forkContext.head;
    var testSegments = forkContext.makeNext(-1, -1);

    // Update state.
    context.test = test;
    context.endOfInitSegments = endOfInitSegments;
    context.continueDestSegments = context.testSegments = testSegments;
    forkContext.replaceHead(testSegments);
},

/**
 * Makes a code path segment for the update part of a ForStatement.
 *
 * @returns {void}
 */
makeForUpdate: function() {
    var context = this.loopContext;
    var choiceContext = this.choiceContext;
    var forkContext = this.forkContext;

    // Make the next paths of the test.
    if (context.testSegments) {
        finalizeTestSegmentsOfFor(
            context,
            choiceContext,
            forkContext.head);
    } else {
        context.endOfInitSegments = forkContext.head;
    }

    // Update state.
    var updateSegments = forkContext.makeDisconnected(-1, -1);

    context.continueDestSegments = context.updateSegments = updateSegments;
    forkContext.replaceHead(updateSegments);
},

/**
 * Makes a code path segment for the body part of a ForStatement.
 *
 * @returns {void}
 */
makeForBody: function() {
    var context = this.loopContext;
    var choiceContext = this.choiceContext;
    var forkContext = this.forkContext;

    // Update state.
    if (context.updateSegments) {
        context.endOfUpdateSegments = forkContext.head;

        // `update` -> `test`
        if (context.testSegments) {
            makeLooped(
                this,
                context.endOfUpdateSegments,
                context.testSegments);
        }
    } else if (context.testSegments) {
        finalizeTestSegmentsOfFor(
            context,
            choiceContext,
            forkContext.head);
    } else {
        context.endOfInitSegments = forkContext.head;
    }

    var bodySegments = context.endOfTestSegments;

    if (!bodySegments) {

        /*
         * If there is not the `test` part, the `body` path comes from the
         * `init` part and the `update` part.
         */
        var prevForkContext = ForkContext.newEmpty(forkContext);

        prevForkContext.add(context.endOfInitSegments);
        if (context.endOfUpdateSegments) {
            prevForkContext.add(context.endOfUpdateSegments);
        }

        bodySegments = prevForkContext.makeNext(0, -1);
    }
    context.continueDestSegments = context.continueDestSegments || bodySegments;
    forkContext.replaceHead(bodySegments);
},

/**
 * Makes a code path segment for the left part of a ForInStatement and a
 * ForOfStatement.
 *
 * @returns {void}
 */
makeForInOfLeft: function() {
    var context = this.loopContext;
    var forkContext = this.forkContext;
    var leftSegments = forkContext.makeDisconnected(-1, -1);

    // Update state.
    context.prevSegments = forkContext.head;
    context.leftSegments = context.continueDestSegments = leftSegments;
    forkContext.replaceHead(leftSegments);
},

/**
 * Makes a code path segment for the right part of a ForInStatement and a
 * ForOfStatement.
 *
 * @returns {void}
 */
makeForInOfRight: function() {
    var context = this.loopContext;
    var forkContext = this.forkContext;
    var temp = ForkContext.newEmpty(forkContext);

    temp.add(context.prevSegments);
    var rightSegments = temp.makeNext(-1, -1);

    // Update state.
    context.endOfLeftSegments = forkContext.head;
    forkContext.replaceHead(rightSegments);
},

/**
 * Makes a code path segment for the body part of a ForInStatement and a
 * ForOfStatement.
 *
 * @returns {void}
 */
makeForInOfBody: function() {
    var context = this.loopContext;
    var forkContext = this.forkContext;
    var temp = ForkContext.newEmpty(forkContext);

    temp.add(context.endOfLeftSegments);
    var bodySegments = temp.makeNext(-1, -1);

    // Make a path: `right` -> `left`.
    makeLooped(this, forkContext.head, context.leftSegments);

    // Update state.
    context.brokenForkContext.add(forkContext.head);
    forkContext.replaceHead(bodySegments);
},

//--------------------------------------------------------------------------
// Control Statements
//--------------------------------------------------------------------------

/**
 * Creates new context for BreakStatement.
 *
 * @param {boolean} breakable - The flag to indicate it can break by
 *      an unlabeled BreakStatement.
 * @param {string|null} label - The label of this context.
 * @returns {object} The new context.
 */
pushBreakContext: function(breakable, label) {
    this.breakContext = {
        upper: this.breakContext,
        breakable: breakable,
        label: label,
        brokenForkContext: ForkContext.newEmpty(this.forkContext)
    };
    return this.breakContext;
},

/**
 * Removes the top item of the break context stack.
 *
 * @returns {object} The removed context.
 */
popBreakContext: function() {
    var context = this.breakContext;
    var forkContext = this.forkContext;

    this.breakContext = context.upper;

    // Process this context here for other than switches and loops.
    if (!context.breakable) {
        var brokenForkContext = context.brokenForkContext;

        if (!brokenForkContext.empty) {
            brokenForkContext.add(forkContext.head);
            forkContext.replaceHead(brokenForkContext.makeNext(0, -1));
        }
    }

    return context;
},

/**
 * Makes a path for a `break` statement.
 *
 * It registers the head segment to a context of `break`.
 * It makes new unreachable segment, then it set the head with the segment.
 *
 * @param {string} label - A label of the break statement.
 * @returns {void}
 */
makeBreak: function(label) {
    var forkContext = this.forkContext;

    if (!forkContext.reachable) {
        return;
    }

    var context = getBreakContext(this, label);

    /* istanbul ignore else: foolproof (syntax error) */
    if (context) {
        context.brokenForkContext.add(forkContext.head);
    }

    forkContext.replaceHead(forkContext.makeUnreachable(-1, -1));
},

/**
 * Makes a path for a `continue` statement.
 *
 * It makes a looping path.
 * It makes new unreachable segment, then it set the head with the segment.
 *
 * @param {string} label - A label of the continue statement.
 * @returns {void}
 */
makeContinue: function(label) {
    var forkContext = this.forkContext;

    if (!forkContext.reachable) {
        return;
    }

    var context = getContinueContext(this, label);

    /* istanbul ignore else: foolproof (syntax error) */
    if (context) {
        if (context.continueDestSegments) {
            makeLooped(this, forkContext.head, context.continueDestSegments);

            // If the context is a for-in/of loop, this effects a break also.
            if (context.type === "ForInStatement" ||
                context.type === "ForOfStatement"
            ) {
                context.brokenForkContext.add(forkContext.head);
            }
        } else {
            context.continueForkContext.add(forkContext.head);
        }
    }
    forkContext.replaceHead(forkContext.makeUnreachable(-1, -1));
},

/**
 * Makes a path for a `return` statement.
 *
 * It registers the head segment to a context of `return`.
 * It makes new unreachable segment, then it set the head with the segment.
 *
 * @returns {void}
 */
makeReturn: function() {
    var forkContext = this.forkContext;

    if (forkContext.reachable) {
        getReturnContext(this).returnedForkContext.add(forkContext.head);
        forkContext.replaceHead(forkContext.makeUnreachable(-1, -1));
    }
},

/**
 * Makes a path for a `throw` statement.
 *
 * It registers the head segment to a context of `throw`.
 * It makes new unreachable segment, then it set the head with the segment.
 *
 * @returns {void}
 */
makeThrow: function() {
    var forkContext = this.forkContext;

    if (forkContext.reachable) {
        getThrowContext(this).thrownForkContext.add(forkContext.head);
        forkContext.replaceHead(forkContext.makeUnreachable(-1, -1));
    }
},

/**
 * Makes the final path.
 * @returns {void}
 */
makeFinal: function() {
    var segments = this.currentSegments;

    if (segments.length > 0 && segments[0].reachable) {
        this.returnedForkContext.add(segments);
    }
}

};

module.exports = CodePathState;

},{“./code-path-segment”:126,“./fork-context”:130}],128:[function(require,module,exports){ /**

* @fileoverview A class of the code path.
* @author Toru Nagashima
*/

“use strict”;

//—————————————————————————— // Requirements //——————————————————————————

var CodePathState = require(“./code-path-state”); var IdGenerator = require(“./id-generator”);

//—————————————————————————— // Public Interface //——————————————————————————

/**

* A code path.
*
* @constructor
* @param {string} id - An identifier.
* @param {CodePath|null} upper - The code path of the upper function scope.
* @param {function} onLooped - A callback function to notify looping.
*/

function CodePath(id, upper, onLooped) {

/**
 * The identifier of this code path.
 * Rules use it to store additional information of each rule.
 * @type {string}
 */
this.id = id;

/**
 * The code path of the upper function scope.
 * @type {CodePath|null}
 */
this.upper = upper;

/**
 * The code paths of nested function scopes.
 * @type {CodePath[]}
 */
this.childCodePaths = [];

// Initializes internal state.
Object.defineProperty(
    this,
    "internal",
    {value: new CodePathState(new IdGenerator(id + "_"), onLooped)});

// Adds this into `childCodePaths` of `upper`.
if (upper) {
    upper.childCodePaths.push(this);
}

}

CodePath.prototype = {

constructor: CodePath,

/**
 * The initial code path segment.
 * @type {CodePathSegment}
 */
get initialSegment() {
    return this.internal.initialSegment;
},

/**
 * Final code path segments.
 * This array is a mix of `returnedSegments` and `thrownSegments`.
 * @type {CodePathSegment[]}
 */
get finalSegments() {
    return this.internal.finalSegments;
},

/**
 * Final code path segments which is with `return` statements.
 * This array contains the last path segment if it's reachable.
 * Since the reachable last path returns `undefined`.
 * @type {CodePathSegment[]}
 */
get returnedSegments() {
    return this.internal.returnedForkContext;
},

/**
 * Final code path segments which is with `throw` statements.
 * @type {CodePathSegment[]}
 */
get thrownSegments() {
    return this.internal.thrownForkContext;
},

/**
 * Current code path segments.
 * @type {CodePathSegment[]}
 */
get currentSegments() {
    return this.internal.currentSegments;
},

/**
 * Traverses all segments in this code path.
 *
 *     codePath.traverseSegments(function(segment, controller) {
 *         // do something.
 *     });
 *
 * This method enumerates segments in order from the head.
 *
 * The `controller` object has two methods.
 *
 * - `controller.skip()` - Skip the following segments in this branch.
 * - `controller.break()` - Skip all following segments.
 *
 * @param {object} [options] - Omittable.
 * @param {CodePathSegment} [options.first] - The first segment to traverse.
 * @param {CodePathSegment} [options.last] - The last segment to traverse.
 * @param {function} callback - A callback function.
 * @returns {void}
 */
traverseSegments: function(options, callback) {
    if (typeof options === "function") {
        callback = options;
        options = null;
    }

    options = options || {};
    var startSegment = options.first || this.internal.initialSegment;
    var lastSegment = options.last;

    var item = null;
    var index = 0;
    var end = 0;
    var segment = null;
    var visited = Object.create(null);
    var stack = [[startSegment, 0]];
    var skippedSegment = null;
    var broken = false;
    var controller = {
        skip: function() {
            if (stack.length <= 1) {
                broken = true;
            } else {
                skippedSegment = stack[stack.length - 2][0];
            }
        },
        break: function() {
            broken = true;
        }
    };

    /**
     * Checks a given previous segment has been visited.
     * @param {CodePathSegment} prevSegment - A previous segment to check.
     * @returns {boolean} `true` if the segment has been visited.
     */
    function isVisited(prevSegment) {
        return (
            visited[prevSegment.id] ||
            segment.isLoopedPrevSegment(prevSegment)
        );
    }

    while (stack.length > 0) {
        item = stack[stack.length - 1];
        segment = item[0];
        index = item[1];

        if (index === 0) {

            // Skip if this segment has been visited already.
            if (visited[segment.id]) {
                stack.pop();
                continue;
            }

            // Skip if all previous segments have not been visited.
            if (segment !== startSegment &&
                segment.prevSegments.length > 0 &&
                !segment.prevSegments.every(isVisited)
            ) {
                stack.pop();
                continue;
            }

            // Reset the flag of skipping if all branches have been skipped.
            if (skippedSegment && segment.prevSegments.indexOf(skippedSegment) !== -1) {
                skippedSegment = null;
            }
            visited[segment.id] = true;

            // Call the callback when the first time.
            if (!skippedSegment) {
                callback.call(this, segment, controller); // eslint-disable-line callback-return
                if (segment === lastSegment) {
                    controller.skip();
                }
                if (broken) {
                    break;
                }
            }
        }

        // Update the stack.
        end = segment.nextSegments.length - 1;
        if (index < end) {
            item[1] += 1;
            stack.push([segment.nextSegments[index], 0]);
        } else if (index === end) {
            item[0] = segment.nextSegments[index];
            item[1] = 0;
        } else {
            stack.pop();
        }
    }
}

};

/**

* Gets the state of a given code path.
*
* @param {CodePath} codePath - A code path to get.
* @returns {CodePathState} The state of the code path.
*/

CodePath.getState = function getState(codePath) {

return codePath.internal;

};

module.exports = CodePath;

},{“./code-path-state”:127,“./id-generator”:131}],129:[function(require,module,exports){ /**

* @fileoverview Helpers to debug for code path analysis.
* @author Toru Nagashima
*/

“use strict”;

//—————————————————————————— // Requirements //——————————————————————————

var debug = require(“debug”)(“eslint:code-path”);

//—————————————————————————— // Helpers //——————————————————————————

/**

* Gets id of a given segment.
* @param {CodePathSegment} segment - A segment to get.
* @returns {string} Id of the segment.
*/

/* istanbul ignore next */ function getId(segment) { // eslint-disable-line require-jsdoc

return segment.id + (segment.reachable ? "" : "!");

}

//—————————————————————————— // Public Interface //——————————————————————————

module.exports = {

/**
 * A flag that debug dumping is enabled or not.
 * @type {boolean}
 */
enabled: debug.enabled,

/**
 * Dumps given objects.
 *
 * @param {...any} args - objects to dump.
 * @returns {void}
 */
dump: debug,

/**
 * Dumps the current analyzing state.
 *
 * @param {ASTNode} node - A node to dump.
 * @param {CodePathState} state - A state to dump.
 * @param {boolean} leaving - A flag whether or not it's leaving
 * @returns {void}
 */
dumpState: !debug.enabled ? debug : /* istanbul ignore next */ function(node, state, leaving) {
    for (var i = 0; i < state.currentSegments.length; ++i) {
        var segInternal = state.currentSegments[i].internal;

        if (leaving) {
            segInternal.exitNodes.push(node);
        } else {
            segInternal.nodes.push(node);
        }
    }

    debug(
        state.currentSegments.map(getId).join(",") + ") " +
        node.type + (leaving ? ":exit" : "")
    );
},

/**
 * Dumps a DOT code of a given code path.
 * The DOT code can be visialized with Graphvis.
 *
 * @param {CodePath} codePath - A code path to dump.
 * @returns {void}
 * @see http://www.graphviz.org
 * @see http://www.webgraphviz.com
 */
dumpDot: !debug.enabled ? debug : /* istanbul ignore next */ function(codePath) {
    var text =
        "\n" +
        "digraph {\n" +
        "node[shape=box,style=\"rounded,filled\",fillcolor=white];\n" +
        "initial[label=\"\",shape=circle,style=filled,fillcolor=black,width=0.25,height=0.25];\n";

    if (codePath.returnedSegments.length > 0) {
        text += "final[label=\"\",shape=doublecircle,style=filled,fillcolor=black,width=0.25,height=0.25];\n";
    }
    if (codePath.thrownSegments.length > 0) {
        text += "thrown[label=\"✘\",shape=circle,width=0.3,height=0.3,fixedsize];\n";
    }

    var traceMap = Object.create(null);
    var arrows = this.makeDotArrows(codePath, traceMap);

    for (var id in traceMap) { // eslint-disable-line guard-for-in
        var segment = traceMap[id];

        text += id + "[";

        if (segment.reachable) {
            text += "label=\"";
        } else {
            text += "style=\"rounded,dashed,filled\",fillcolor=\"#FF9800\",label=\"<<unreachable>>\\n";
        }

        if (segment.internal.nodes.length > 0) {
            text += segment.internal.nodes.map(function(node) {
                switch (node.type) {
                    case "Identifier": return node.type + " (" + node.name + ")";
                    case "Literal": return node.type + " (" + node.value + ")";
                    default: return node.type;
                }
            }).join("\\n");
        } else if (segment.internal.exitNodes.length > 0) {
            text += segment.internal.exitNodes.map(function(node) {
                switch (node.type) {
                    case "Identifier": return node.type + ":exit (" + node.name + ")";
                    case "Literal": return node.type + ":exit (" + node.value + ")";
                    default: return node.type + ":exit";
                }
            }).join("\\n");
        } else {
            text += "????";
        }

        text += "\"];\n";
    }

    text += arrows + "\n";
    text += "}";
    debug("DOT", text);
},

/**
 * Makes a DOT code of a given code path.
 * The DOT code can be visialized with Graphvis.
 *
 * @param {CodePath} codePath - A code path to make DOT.
 * @param {object} traceMap - Optional. A map to check whether or not segments had been done.
 * @returns {string} A DOT code of the code path.
 */
makeDotArrows: function(codePath, traceMap) {
    var stack = [[codePath.initialSegment, 0]];
    var done = traceMap || Object.create(null);
    var lastId = codePath.initialSegment.id;
    var text = "initial->" + codePath.initialSegment.id;

    while (stack.length > 0) {
        var item = stack.pop();
        var segment = item[0];
        var index = item[1];

        if (done[segment.id] && index === 0) {
            continue;
        }
        done[segment.id] = segment;

        var nextSegment = segment.allNextSegments[index];

        if (!nextSegment) {
            continue;
        }

        if (lastId === segment.id) {
            text += "->" + nextSegment.id;
        } else {
            text += ";\n" + segment.id + "->" + nextSegment.id;
        }
        lastId = nextSegment.id;

        stack.unshift([segment, 1 + index]);
        stack.push([nextSegment, 0]);
    }

    codePath.returnedSegments.forEach(function(finalSegment) {
        if (lastId === finalSegment.id) {
            text += "->final";
        } else {
            text += ";\n" + finalSegment.id + "->final";
        }
        lastId = null;
    });

    codePath.thrownSegments.forEach(function(finalSegment) {
        if (lastId === finalSegment.id) {
            text += "->thrown";
        } else {
            text += ";\n" + finalSegment.id + "->thrown";
        }
        lastId = null;
    });

    return text + ";";
}

};

},{“debug”:8}],130:[function(require,module,exports){ /**

* @fileoverview A class to operate forking.
*
* This is state of forking.
* This has a fork list and manages it.
*
* @author Toru Nagashima
*/

“use strict”;

//—————————————————————————— // Requirements //——————————————————————————

var assert = require(“assert”),

CodePathSegment = require("./code-path-segment");

//—————————————————————————— // Helpers //——————————————————————————

/**

* Gets whether or not a given segment is reachable.
*
* @param {CodePathSegment} segment - A segment to get.
* @returns {boolean} `true` if the segment is reachable.
*/

function isReachable(segment) {

return segment.reachable;

}

/**

* Creates new segments from the specific range of `context.segmentsList`.
*
* When `context.segmentsList` is `[[a, b], [c, d], [e, f]]`, `begin` is `0`, and
* `end` is `-1`, this creates `[g, h]`. This `g` is from `a`, `c`, and `e`.
* This `h` is from `b`, `d`, and `f`.
*
* @param {ForkContext} context - An instance.
* @param {number} begin - The first index of the previous segments.
* @param {number} end - The last index of the previous segments.
* @param {function} create - A factory function of new segments.
* @returns {CodePathSegment[]} New segments.
*/

function makeSegments(context, begin, end, create) {

var list = context.segmentsList;

if (begin < 0) {
    begin = list.length + begin;
}
if (end < 0) {
    end = list.length + end;
}

var segments = [];

for (var i = 0; i < context.count; ++i) {
    var allPrevSegments = [];

    for (var j = begin; j <= end; ++j) {
        allPrevSegments.push(list[j][i]);
    }

    segments.push(create(context.idGenerator.next(), allPrevSegments));
}

return segments;

}

/**

* `segments` becomes doubly in a `finally` block. Then if a code path exits by a
* control statement (such as `break`, `continue`) from the `finally` block, the
* destination's segments may be half of the source segments. In that case, this
* merges segments.
*
* @param {ForkContext} context - An instance.
* @param {CodePathSegment[]} segments - Segments to merge.
* @returns {CodePathSegment[]} The merged segments.
*/

function mergeExtraSegments(context, segments) {

while (segments.length > context.count) {
    var merged = [];

    for (var i = 0, length = segments.length / 2 | 0; i < length; ++i) {
        merged.push(CodePathSegment.newNext(
            context.idGenerator.next(),
            [segments[i], segments[i + length]]
        ));
    }
    segments = merged;
}
return segments;

}

//—————————————————————————— // Public Interface //——————————————————————————

/**

* A class to manage forking.
*
* @constructor
* @param {IdGenerator} idGenerator - An identifier generator for segments.
* @param {ForkContext|null} upper - An upper fork context.
* @param {number} count - A number of parallel segments.
*/

function ForkContext(idGenerator, upper, count) {

this.idGenerator = idGenerator;
this.upper = upper;
this.count = count;
this.segmentsList = [];

}

ForkContext.prototype = {

constructor: ForkContext,

/**
 * The head segments.
 * @type {CodePathSegment[]}
 */
get head() {
    var list = this.segmentsList;

    return list.length === 0 ? [] : list[list.length - 1];
},

/**
 * A flag which shows empty.
 * @type {boolean}
 */
get empty() {
    return this.segmentsList.length === 0;
},

/**
 * A flag which shows reachable.
 * @type {boolean}
 */
get reachable() {
    var segments = this.head;

    return segments.length > 0 && segments.some(isReachable);
},

/**
 * Creates new segments from this context.
 *
 * @param {number} begin - The first index of previous segments.
 * @param {number} end - The last index of previous segments.
 * @returns {CodePathSegment[]} New segments.
 */
makeNext: function(begin, end) {
    return makeSegments(this, begin, end, CodePathSegment.newNext);
},

/**
 * Creates new segments from this context.
 * The new segments is always unreachable.
 *
 * @param {number} begin - The first index of previous segments.
 * @param {number} end - The last index of previous segments.
 * @returns {CodePathSegment[]} New segments.
 */
makeUnreachable: function(begin, end) {
    return makeSegments(this, begin, end, CodePathSegment.newUnreachable);
},

/**
 * Creates new segments from this context.
 * The new segments don't have connections for previous segments.
 * But these inherit the reachable flag from this context.
 *
 * @param {number} begin - The first index of previous segments.
 * @param {number} end - The last index of previous segments.
 * @returns {CodePathSegment[]} New segments.
 */
makeDisconnected: function(begin, end) {
    return makeSegments(this, begin, end, CodePathSegment.newDisconnected);
},

/**
 * Adds segments into this context.
 * The added segments become the head.
 *
 * @param {CodePathSegment[]} segments - Segments to add.
 * @returns {void}
 */
add: function(segments) {
    assert(segments.length >= this.count, segments.length + " >= " + this.count);

    this.segmentsList.push(mergeExtraSegments(this, segments));
},

/**
 * Replaces the head segments with given segments.
 * The current head segments are removed.
 *
 * @param {CodePathSegment[]} segments - Segments to add.
 * @returns {void}
 */
replaceHead: function(segments) {
    assert(segments.length >= this.count, segments.length + " >= " + this.count);

    this.segmentsList.splice(-1, 1, mergeExtraSegments(this, segments));
},

/**
 * Adds all segments of a given fork context into this context.
 *
 * @param {ForkContext} context - A fork context to add.
 * @returns {void}
 */
addAll: function(context) {
    assert(context.count === this.count);

    var source = context.segmentsList;

    for (var i = 0; i < source.length; ++i) {
        this.segmentsList.push(source[i]);
    }
},

/**
 * Clears all secments in this context.
 *
 * @returns {void}
 */
clear: function() {
    this.segmentsList = [];
}

};

/**

* Creates the root fork context.
*
* @param {IdGenerator} idGenerator - An identifier generator for segments.
* @returns {ForkContext} New fork context.
*/

ForkContext.newRoot = function(idGenerator) {

var context = new ForkContext(idGenerator, null, 1);

context.add([CodePathSegment.newRoot(idGenerator.next())]);

return context;

};

/**

* Creates an empty fork context preceded by a given context.
*
* @param {ForkContext} parentContext - The parent fork context.
* @param {boolean} forkLeavingPath - A flag which shows inside of `finally` block.
* @returns {ForkContext} New fork context.
*/

ForkContext.newEmpty = function(parentContext, forkLeavingPath) {

return new ForkContext(
    parentContext.idGenerator,
    parentContext,
    (forkLeavingPath ? 2 : 1) * parentContext.count);

};

module.exports = ForkContext;

},{“./code-path-segment”:126,“assert”:5}],131:[function(require,module,exports){ /**

* @fileoverview A class of identifiers generator for code path segments.
*
* Each rule uses the identifier of code path segments to store additional
* information of the code path.
*
* @author Toru Nagashima
*/

“use strict”;

//—————————————————————————— // Public Interface //——————————————————————————

/**

* A generator for unique ids.
*
* @constructor
* @param {string} prefix - Optional. A prefix of generated ids.
*/

function IdGenerator(prefix) {

this.prefix = String(prefix);
this.n = 0;

}

/**

* Generates id.
*
* @returns {string} A generated id.
*/

IdGenerator.prototype.next = function() {

this.n = 1 + this.n | 0;

/* istanbul ignore if */
if (this.n < 0) {
    this.n = 1;
}

return this.prefix + this.n;

};

module.exports = IdGenerator;

},{}],132:[function(require,module,exports){ /**

* @fileoverview Config file operations. This file must be usable in the browser,
* so no Node-specific code can be here.
* @author Nicholas C. Zakas
*/

“use strict”;

//—————————————————————————— // Requirements //——————————————————————————

var lodash = require(“lodash”),

debug = require("debug"),
Environments = require("./environments");

//—————————————————————————— // Private //——————————————————————————

debug = debug(“eslint:config-ops”);

var RULE_SEVERITY_STRINGS = [“off”, “warn”, “error”],

RULE_SEVERITY = RULE_SEVERITY_STRINGS.reduce(function(map, value, index) {
    map[value] = index;
    return map;
}, {}),
VALID_SEVERITIES = [0, 1, 2, "off", "warn", "error"];

//—————————————————————————— // Public Interface //——————————————————————————

module.exports = {

/**
 * Creates an empty configuration object suitable for merging as a base.
 * @returns {Object} A configuration object.
 */
createEmptyConfig: function() {
    return {
        globals: {},
        env: {},
        rules: {},
        parserOptions: {}
    };
},

/**
 * Creates an environment config based on the specified environments.
 * @param {Object<string,boolean>} env The environment settings.
 * @returns {Object} A configuration object with the appropriate rules and globals
 *      set.
 */
createEnvironmentConfig: function(env) {

    var envConfig = this.createEmptyConfig();

    if (env) {

        envConfig.env = env;

        Object.keys(env).filter(function(name) {
            return env[name];
        }).forEach(function(name) {
            var environment = Environments.get(name);

            if (environment) {
                debug("Creating config for environment " + name);
                if (environment.globals) {
                    lodash.assign(envConfig.globals, environment.globals);
                }

                if (environment.parserOptions) {
                    lodash.assign(envConfig.parserOptions, environment.parserOptions);
                }
            }
        });
    }

    return envConfig;
},

/**
 * Given a config with environment settings, applies the globals and
 * ecmaFeatures to the configuration and returns the result.
 * @param {Object} config The configuration information.
 * @returns {Object} The updated configuration information.
 */
applyEnvironments: function(config) {
    if (config.env && typeof config.env === "object") {
        debug("Apply environment settings to config");
        return this.merge(this.createEnvironmentConfig(config.env), config);
    }

    return config;
},

/**
 * Merges two config objects. This will not only add missing keys, but will also modify values to match.
 * @param {Object} target config object
 * @param {Object} src config object. Overrides in this config object will take priority over base.
 * @param {boolean} [combine] Whether to combine arrays or not
 * @param {boolean} [isRule] Whether its a rule
 * @returns {Object} merged config object.
 */
merge: function deepmerge(target, src, combine, isRule) {

    /*
     The MIT License (MIT)

     Copyright (c) 2012 Nicholas Fisher

     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.
     */

    /*
     * This code is taken from deepmerge repo
     * (https://github.com/KyleAMathews/deepmerge)
     * and modified to meet our needs.
     */
    var array = Array.isArray(src) || Array.isArray(target);
    var dst = array && [] || {};

    combine = !!combine;
    isRule = !!isRule;
    if (array) {
        target = target || [];

        // src could be a string, so check for array
        if (isRule && Array.isArray(src) && src.length > 1) {
            dst = dst.concat(src);
        } else {
            dst = dst.concat(target);
        }
        if (typeof src !== "object" && !Array.isArray(src)) {
            src = [src];
        }
        Object.keys(src).forEach(function(e, i) {
            e = src[i];
            if (typeof dst[i] === "undefined") {
                dst[i] = e;
            } else if (typeof e === "object") {
                if (isRule) {
                    dst[i] = e;
                } else {
                    dst[i] = deepmerge(target[i], e, combine, isRule);
                }
            } else {
                if (!combine) {
                    dst[i] = e;
                } else {
                    if (dst.indexOf(e) === -1) {
                        dst.push(e);
                    }
                }
            }
        });
    } else {
        if (target && typeof target === "object") {
            Object.keys(target).forEach(function(key) {
                dst[key] = target[key];
            });
        }
        Object.keys(src).forEach(function(key) {
            if (Array.isArray(src[key]) || Array.isArray(target[key])) {
                dst[key] = deepmerge(target[key], src[key], key === "plugins", isRule);
            } else if (typeof src[key] !== "object" || !src[key] || key === "exported" || key === "astGlobals") {
                dst[key] = src[key];
            } else {
                dst[key] = deepmerge(target[key] || {}, src[key], combine, key === "rules");
            }
        });
    }

    return dst;
},

/**
 * Converts new-style severity settings (off, warn, error) into old-style
 * severity settings (0, 1, 2) for all rules. Assumption is that severity
 * values have already been validated as correct.
 * @param {Object} config The config object to normalize.
 * @returns {void}
 */
normalize: function(config) {

    if (config.rules) {
        Object.keys(config.rules).forEach(function(ruleId) {
            var ruleConfig = config.rules[ruleId];

            if (typeof ruleConfig === "string") {
                config.rules[ruleId] = RULE_SEVERITY[ruleConfig.toLowerCase()] || 0;
            } else if (Array.isArray(ruleConfig) && typeof ruleConfig[0] === "string") {
                ruleConfig[0] = RULE_SEVERITY[ruleConfig[0].toLowerCase()] || 0;
            }
        });
    }
},

/**
 * Converts old-style severity settings (0, 1, 2) into new-style
 * severity settings (off, warn, error) for all rules. Assumption is that severity
 * values have already been validated as correct.
 * @param {Object} config The config object to normalize.
 * @returns {void}
 */
normalizeToStrings: function(config) {

    if (config.rules) {
        Object.keys(config.rules).forEach(function(ruleId) {
            var ruleConfig = config.rules[ruleId];

            if (typeof ruleConfig === "number") {
                config.rules[ruleId] = RULE_SEVERITY_STRINGS[ruleConfig] || RULE_SEVERITY_STRINGS[0];
            } else if (Array.isArray(ruleConfig) && typeof ruleConfig[0] === "number") {
                ruleConfig[0] = RULE_SEVERITY_STRINGS[ruleConfig[0]] || RULE_SEVERITY_STRINGS[0];
            }
        });
    }
},

/**
 * Determines if the severity for the given rule configuration represents an error.
 * @param {int|string|Array} ruleConfig The configuration for an individual rule.
 * @returns {boolean} True if the rule represents an error, false if not.
 */
isErrorSeverity: function(ruleConfig) {

    var severity = Array.isArray(ruleConfig) ? ruleConfig[0] : ruleConfig;

    if (typeof severity === "string") {
        severity = RULE_SEVERITY[severity.toLowerCase()] || 0;
    }

    return (typeof severity === "number" && severity === 2);
},

/**
 * Checks whether a given config has valid severity or not.
 * @param {number|string|Array} ruleConfig - The configuration for an individual rule.
 * @returns {boolean} `true` if the configuration has valid severity.
 */
isValidSeverity: function(ruleConfig) {
    var severity = Array.isArray(ruleConfig) ? ruleConfig[0] : ruleConfig;

    if (typeof severity === "string") {
        severity = severity.toLowerCase();
    }
    return VALID_SEVERITIES.indexOf(severity) !== -1;
},

/**
 * Checks whether every rule of a given config has valid severity or not.
 * @param {object} config - The configuration for rules.
 * @returns {boolean} `true` if the configuration has valid severity.
 */
isEverySeverityValid: function(config) {
    return Object.keys(config).every(function(ruleId) {
        return this.isValidSeverity(config[ruleId]);
    }, this);
}

};

},{“./environments”:134,“debug”:8,“lodash”:108}],133:[function(require,module,exports){ /**

* @fileoverview Validates configs.
* @author Brandon Mills
*/

“use strict”;

//—————————————————————————— // Requirements //——————————————————————————

var rules = require(“../rules”),

Environments = require("./environments"),
schemaValidator = require("is-my-json-valid"),
util = require("util");

var validators = {

rules: Object.create(null)

};

//—————————————————————————— // Private //——————————————————————————

/**

* Gets a complete options schema for a rule.
* @param {string} id The rule's unique name.
* @returns {object} JSON Schema for the rule's options.
*/

function getRuleOptionsSchema(id) {

var rule = rules.get(id),
    schema = rule && rule.schema || rule && rule.meta && rule.meta.schema;

// Given a tuple of schemas, insert warning level at the beginning
if (Array.isArray(schema)) {
    if (schema.length) {
        return {
            type: "array",
            items: schema,
            minItems: 0,
            maxItems: schema.length
        };
    } else {
        return {
            type: "array",
            minItems: 0,
            maxItems: 0
        };
    }
}

// Given a full schema, leave it alone
return schema || null;

}

/**

* Validates a rule's options against its schema.
* @param {string} id The rule's unique name.
* @param {array|number} options The given options for the rule.
* @param {string} source The name of the configuration source.
* @returns {void}
*/

function validateRuleOptions(id, options, source) {

var validateRule = validators.rules[id],
    message,
    severity,
    localOptions,
    schema = getRuleOptionsSchema(id),
    validSeverity = true;

if (!validateRule && schema) {
    validateRule = schemaValidator(schema, { verbose: true });
    validators.rules[id] = validateRule;
}

// if it's not an array, it should be just a severity
if (Array.isArray(options)) {
    localOptions = options.concat();    // clone
    severity = localOptions.shift();
} else {
    severity = options;
    localOptions = [];
}

validSeverity = (
    severity === 0 || severity === 1 || severity === 2 ||
    (typeof severity === "string" && /^(?:off|warn|error)$/i.test(severity))
);

if (validateRule) {
    validateRule(localOptions);
}

if ((validateRule && validateRule.errors) || !validSeverity) {
    message = [
        source, ":\n",
        "\tConfiguration for rule \"", id, "\" is invalid:\n"
    ];

    if (!validSeverity) {
        message.push(
            "\tSeverity should be one of the following: 0 = off, 1 = warn, 2 = error (you passed '",
            util.inspect(severity).replace(/'/g, "\"").replace(/\n/g, ""),
            "').\n"
        );
    }

    if (validateRule && validateRule.errors) {
        validateRule.errors.forEach(function(error) {
            message.push(
                "\tValue \"", error.value, "\" ", error.message, ".\n"
            );
        });
    }

    throw new Error(message.join(""));
}

}

/**

* Validates an environment object
* @param {object} environment The environment config object to validate.
* @param {string} source The location to report with any errors.
* @returns {void}
*/

function validateEnvironment(environment, source) {

// not having an environment is ok
if (!environment) {
    return;
}

if (Array.isArray(environment)) {
    throw new Error("Environment must not be an array");
}

if (typeof environment === "object") {
    Object.keys(environment).forEach(function(env) {
        if (!Environments.get(env)) {
            var message = [
                source, ":\n",
                "\tEnvironment key \"", env, "\" is unknown\n"
            ];

            throw new Error(message.join(""));
        }
    });
} else {
    throw new Error("Environment must be an object");
}

}

/**

* Validates an entire config object.
* @param {object} config The config object to validate.
* @param {string} source The location to report with any errors.
* @returns {void}
*/

function validate(config, source) {

if (typeof config.rules === "object") {
    Object.keys(config.rules).forEach(function(id) {
        validateRuleOptions(id, config.rules[id], source);
    });
}

validateEnvironment(config.env, source);

}

//—————————————————————————— // Public Interface //——————————————————————————

module.exports = {

getRuleOptionsSchema: getRuleOptionsSchema,
validate: validate,
validateRuleOptions: validateRuleOptions

};

},{“../rules”:138,“./environments”:134,“is-my-json-valid”:101,“util”:122}],134:[function(require,module,exports){ /**

* @fileoverview Environments manager
* @author Nicholas C. Zakas
*/

“use strict”;

//—————————————————————————— // Requirements //——————————————————————————

var debug = require(“debug”),

envs = require("../../conf/environments");

//—————————————————————————— // Private //——————————————————————————

debug = debug(“eslint:enviroments”);

var environments = Object.create(null);

/**

* Loads the default environments.
* @returns {void}
* @private
*/

function load() {

Object.keys(envs).forEach(function(envName) {
    environments[envName] = envs[envName];
});

}

// always load default environments upfront load();

//—————————————————————————— // Public Interface //——————————————————————————

module.exports = {

load: load,

/**
 * Gets the environment with the given name.
 * @param {string} name The name of the environment to retrieve.
 * @returns {Object?} The environment object or null if not found.
 */
get: function(name) {
    return environments[name] || null;
},

/**
 * Defines an environment.
 * @param {string} name The name of the environment.
 * @param {Object} env The environment settings.
 * @returns {void}
 */
define: function(name, env) {
    environments[name] = env;
},

/**
 * Imports all environments from a plugin.
 * @param {Object} plugin The plugin object.
 * @param {string} pluginName The name of the plugin.
 * @returns {void}
 */
importPlugin: function(plugin, pluginName) {
    if (plugin.environments) {
        Object.keys(plugin.environments).forEach(function(envName) {
            this.define(pluginName + "/" + envName, plugin.environments[envName]);
        }, this);
    }
},

/**
 * Resets all environments. Only use for tests!
 * @returns {void}
 */
testReset: function() {
    environments = Object.create(null);
    load();
}

};

},{“../../conf/environments”:2,“debug”:8}],135:[function(require,module,exports){ /**

* @fileoverview Main ESLint object.
* @author Nicholas C. Zakas
*/

“use strict”;

//—————————————————————————— // Requirements //——————————————————————————

var assert = require(“assert”),

EventEmitter = require("events").EventEmitter,
escope = require("escope"),
levn = require("levn"),
lodash = require("lodash"),
blankScriptAST = require("../conf/blank-script.json"),
DEFAULT_PARSER = require("../conf/eslint.json").parser,
replacements = require("../conf/replacements.json"),
CodePathAnalyzer = require("./code-path-analysis/code-path-analyzer"),
ConfigOps = require("./config/config-ops"),
validator = require("./config/config-validator"),
Environments = require("./config/environments"),
CommentEventGenerator = require("./util/comment-event-generator"),
NodeEventGenerator = require("./util/node-event-generator"),
SourceCode = require("./util/source-code"),
Traverser = require("./util/traverser"),
RuleContext = require("./rule-context"),
rules = require("./rules"),
timing = require("./timing");

//—————————————————————————— // Helpers //——————————————————————————

/**

* Parses a list of "name:boolean_value" or/and "name" options divided by comma or
* whitespace.
* @param {string} string The string to parse.
* @param {Comment} comment The comment node which has the string.
* @returns {Object} Result map object of names and boolean values
*/

function parseBooleanConfig(string, comment) {

var items = {};

// Collapse whitespace around : to make parsing easier
string = string.replace(/\s*:\s*/g, ":");

// Collapse whitespace around ,
string = string.replace(/\s*,\s*/g, ",");

string.split(/\s|,+/).forEach(function(name) {
    if (!name) {
        return;
    }
    var pos = name.indexOf(":"),
        value;

    if (pos !== -1) {
        value = name.substring(pos + 1, name.length);
        name = name.substring(0, pos);
    }

    items[name] = {
        value: (value === "true"),
        comment: comment
    };

});
return items;

}

/**

* Parses a JSON-like config.
* @param {string} string The string to parse.
* @param {Object} location Start line and column of comments for potential error message.
* @param {Object[]} messages The messages queue for potential error message.
* @returns {Object} Result map object
*/

function parseJsonConfig(string, location, messages) {

var items = {};

// Parses a JSON-like comment by the same way as parsing CLI option.
try {
    items = levn.parse("Object", string) || {};

    // Some tests say that it should ignore invalid comments such as `/*eslint no-alert:abc*/`.
    // Also, commaless notations have invalid severity:
    //     "no-alert: 2 no-console: 2" --> {"no-alert": "2 no-console: 2"}
    // Should ignore that case as well.
    if (ConfigOps.isEverySeverityValid(items)) {
        return items;
    }
} catch (ex) {

    // ignore to parse the string by a fallback.
}

// Optionator cannot parse commaless notations.
// But we are supporting that. So this is a fallback for that.
items = {};
string = string.replace(/([a-zA-Z0-9\-\/]+):/g, "\"$1\":").replace(/(\]|[0-9])\s+(?=")/, "$1,");
try {
    items = JSON.parse("{" + string + "}");
} catch (ex) {

    messages.push({
        ruleId: null,
        fatal: true,
        severity: 2,
        source: null,
        message: "Failed to parse JSON from '" + string + "': " + ex.message,
        line: location.start.line,
        column: location.start.column + 1
    });

}

return items;

}

/**

* Parses a config of values separated by comma.
* @param {string} string The string to parse.
* @returns {Object} Result map of values and true values
*/

function parseListConfig(string) {

var items = {};

// Collapse whitespace around ,
string = string.replace(/\s*,\s*/g, ",");

string.split(/,+/).forEach(function(name) {
    name = name.trim();
    if (!name) {
        return;
    }
    items[name] = true;
});
return items;

}

/**

* Ensures that variables representing built-in properties of the Global Object,
* and any globals declared by special block comments, are present in the global
* scope.
* @param {ASTNode} program The top node of the AST.
* @param {Scope} globalScope The global scope.
* @param {Object} config The existing configuration data.
* @returns {void}
*/

function addDeclaredGlobals(program, globalScope, config) {

var declaredGlobals = {},
    exportedGlobals = {},
    explicitGlobals = {},
    builtin = Environments.get("builtin");

lodash.assign(declaredGlobals, builtin);

Object.keys(config.env).forEach(function(name) {
    if (config.env[name]) {
        var env = Environments.get(name),
            environmentGlobals = env && env.globals;

        if (environmentGlobals) {
            lodash.assign(declaredGlobals, environmentGlobals);
        }
    }
});

lodash.assign(exportedGlobals, config.exported);
lodash.assign(declaredGlobals, config.globals);
lodash.assign(explicitGlobals, config.astGlobals);

Object.keys(declaredGlobals).forEach(function(name) {
    var variable = globalScope.set.get(name);

    if (!variable) {
        variable = new escope.Variable(name, globalScope);
        variable.eslintExplicitGlobal = false;
        globalScope.variables.push(variable);
        globalScope.set.set(name, variable);
    }
    variable.writeable = declaredGlobals[name];
});

Object.keys(explicitGlobals).forEach(function(name) {
    var variable = globalScope.set.get(name);

    if (!variable) {
        variable = new escope.Variable(name, globalScope);
        variable.eslintExplicitGlobal = true;
        variable.eslintExplicitGlobalComment = explicitGlobals[name].comment;
        globalScope.variables.push(variable);
        globalScope.set.set(name, variable);
    }
    variable.writeable = explicitGlobals[name].value;
});

// mark all exported variables as such
Object.keys(exportedGlobals).forEach(function(name) {
    var variable = globalScope.set.get(name);

    if (variable) {
        variable.eslintUsed = true;
    }
});

/*
 * "through" contains all references which definitions cannot be found.
 * Since we augment the global scope using configuration, we need to update
 * references and remove the ones that were added by configuration.
 */
globalScope.through = globalScope.through.filter(function(reference) {
    var name = reference.identifier.name;
    var variable = globalScope.set.get(name);

    if (variable) {

        /*
         * Links the variable and the reference.
         * And this reference is removed from `Scope#through`.
         */
        reference.resolved = variable;
        variable.references.push(reference);

        return false;
    }

    return true;
});

}

/**

* Add data to reporting configuration to disable reporting for list of rules
* starting from start location
* @param  {Object[]} reportingConfig Current reporting configuration
* @param  {Object} start Position to start
* @param  {string[]} rulesToDisable List of rules
* @returns {void}
*/

function disableReporting(reportingConfig, start, rulesToDisable) {

if (rulesToDisable.length) {
    rulesToDisable.forEach(function(rule) {
        reportingConfig.push({
            start: start,
            end: null,
            rule: rule
        });
    });
} else {
    reportingConfig.push({
        start: start,
        end: null,
        rule: null
    });
}

}

/**

* Add data to reporting configuration to enable reporting for list of rules
* starting from start location
* @param  {Object[]} reportingConfig Current reporting configuration
* @param  {Object} start Position to start
* @param  {string[]} rulesToEnable List of rules
* @returns {void}
*/

function enableReporting(reportingConfig, start, rulesToEnable) {

var i;

if (rulesToEnable.length) {
    rulesToEnable.forEach(function(rule) {
        for (i = reportingConfig.length - 1; i >= 0; i--) {
            if (!reportingConfig[i].end && reportingConfig[i].rule === rule) {
                reportingConfig[i].end = start;
                break;
            }
        }
    });
} else {

    // find all previous disabled locations if they was started as list of rules
    var prevStart;

    for (i = reportingConfig.length - 1; i >= 0; i--) {
        if (prevStart && prevStart !== reportingConfig[i].start) {
            break;
        }

        if (!reportingConfig[i].end) {
            reportingConfig[i].end = start;
            prevStart = reportingConfig[i].start;
        }
    }
}

}

/**

* Parses comments in file to extract file-specific config of rules, globals
* and environments and merges them with global config; also code blocks
* where reporting is disabled or enabled and merges them with reporting config.
* @param {string} filename The file being checked.
* @param {ASTNode} ast The top node of the AST.
* @param {Object} config The existing configuration data.
* @param {Object[]} reportingConfig The existing reporting configuration data.
* @param {Object[]} messages The messages queue.
* @returns {object} Modified config object
*/

function modifyConfigsFromComments(filename, ast, config, reportingConfig, messages) {

var commentConfig = {
    exported: {},
    astGlobals: {},
    rules: {},
    env: {}
};
var commentRules = {};

ast.comments.forEach(function(comment) {

    var value = comment.value.trim();
    var match = /^(eslint(-\w+){0,3}|exported|globals?)(\s|$)/.exec(value);

    if (match) {
        value = value.substring(match.index + match[1].length);

        if (comment.type === "Block") {
            switch (match[1]) {
                case "exported":
                    lodash.assign(commentConfig.exported, parseBooleanConfig(value, comment));
                    break;

                case "globals":
                case "global":
                    lodash.assign(commentConfig.astGlobals, parseBooleanConfig(value, comment));
                    break;

                case "eslint-env":
                    lodash.assign(commentConfig.env, parseListConfig(value));
                    break;

                case "eslint-disable":
                    disableReporting(reportingConfig, comment.loc.start, Object.keys(parseListConfig(value)));
                    break;

                case "eslint-enable":
                    enableReporting(reportingConfig, comment.loc.start, Object.keys(parseListConfig(value)));
                    break;

                case "eslint":
                    var items = parseJsonConfig(value, comment.loc, messages);

                    Object.keys(items).forEach(function(name) {
                        var ruleValue = items[name];

                        validator.validateRuleOptions(name, ruleValue, filename + " line " + comment.loc.start.line);
                        commentRules[name] = ruleValue;
                    });
                    break;

                // no default
            }
        } else {        // comment.type === "Line"
            if (match[1] === "eslint-disable-line") {
                disableReporting(reportingConfig, { line: comment.loc.start.line, column: 0 }, Object.keys(parseListConfig(value)));
                enableReporting(reportingConfig, comment.loc.end, Object.keys(parseListConfig(value)));
            } else if (match[1] === "eslint-disable-next-line") {
                disableReporting(reportingConfig, comment.loc.start, Object.keys(parseListConfig(value)));
                enableReporting(reportingConfig, { line: comment.loc.start.line + 2 }, Object.keys(parseListConfig(value)));
            }
        }
    }
});

// apply environment configs
Object.keys(commentConfig.env).forEach(function(name) {
    var env = Environments.get(name);

    if (env) {
        commentConfig = ConfigOps.merge(commentConfig, env);
    }
});
lodash.assign(commentConfig.rules, commentRules);

return ConfigOps.merge(config, commentConfig);

}

/**

* Check if message of rule with ruleId should be ignored in location
* @param  {Object[]} reportingConfig  Collection of ignore records
* @param  {string} ruleId   Id of rule
* @param  {Object} location Location of message
* @returns {boolean}          True if message should be ignored, false otherwise
*/

function isDisabledByReportingConfig(reportingConfig, ruleId, location) {

for (var i = 0, c = reportingConfig.length; i < c; i++) {

    var ignore = reportingConfig[i];

    if ((!ignore.rule || ignore.rule === ruleId) &&
        (location.line > ignore.start.line || (location.line === ignore.start.line && location.column >= ignore.start.column)) &&
        (!ignore.end || (location.line < ignore.end.line || (location.line === ignore.end.line && location.column <= ignore.end.column)))) {
        return true;
    }
}

return false;

}

/**

* Process initial config to make it safe to extend by file comment config
* @param  {Object} config Initial config
* @returns {Object}        Processed config
*/

function prepareConfig(config) {

config.globals = config.globals || config.global || {};
delete config.global;

var copiedRules = {},
    parserOptions = {},
    preparedConfig;

if (typeof config.rules === "object") {
    Object.keys(config.rules).forEach(function(k) {
        var rule = config.rules[k];

        if (rule === null) {
            throw new Error("Invalid config for rule '" + k + "'\.");
        }
        if (Array.isArray(rule)) {
            copiedRules[k] = rule.slice();
        } else {
            copiedRules[k] = rule;
        }
    });
}

// merge in environment parserOptions
if (typeof config.env === "object") {
    Object.keys(config.env).forEach(function(envName) {
        var env = Environments.get(envName);

        if (config.env[envName] && env && env.parserOptions) {
            parserOptions = ConfigOps.merge(parserOptions, env.parserOptions);
        }
    });
}

preparedConfig = {
    rules: copiedRules,
    parser: config.parser || DEFAULT_PARSER,
    globals: ConfigOps.merge({}, config.globals),
    env: ConfigOps.merge({}, config.env || {}),
    settings: ConfigOps.merge({}, config.settings || {}),
    parserOptions: ConfigOps.merge(parserOptions, config.parserOptions || {})
};

if (preparedConfig.parserOptions.sourceType === "module") {
    if (!preparedConfig.parserOptions.ecmaFeatures) {
        preparedConfig.parserOptions.ecmaFeatures = {};
    }

    // can't have global return inside of modules
    preparedConfig.parserOptions.ecmaFeatures.globalReturn = false;

    // also need at least ES6 for modules
    if (!preparedConfig.parserOptions.ecmaVersion || preparedConfig.parserOptions.ecmaVersion < 6) {
        preparedConfig.parserOptions.ecmaVersion = 6;
    }
}

return preparedConfig;

}

/**

* Provide a stub rule with a given message
* @param  {string} message The message to be displayed for the rule
* @returns {Function}      Stub rule function
*/

function createStubRule(message) {

/**
 * Creates a fake rule object
 * @param {object} context context object for each rule
 * @returns {object} collection of node to listen on
 */
function createRuleModule(context) {
    return {
        Program: function(node) {
            context.report(node, message);
        }
    };
}

if (message) {
    return createRuleModule;
} else {
    throw new Error("No message passed to stub rule");
}

}

/**

* Provide a rule replacement message
* @param  {string} ruleId Name of the rule
* @returns {string}       Message detailing rule replacement
*/

function getRuleReplacementMessage(ruleId) {

if (ruleId in replacements.rules) {
    var newRules = replacements.rules[ruleId];

    return "Rule \'" + ruleId + "\' was removed and replaced by: " + newRules.join(", ");
}

return null;

}

var eslintEnvPattern = //*s*eslint-envs(.+?)*//g;

/**

* Checks whether or not there is a comment which has "eslint-env *" in a given text.
* @param {string} text - A source code text to check.
* @returns {object|null} A result of parseListConfig() with "eslint-env *" comment.
*/

function findEslintEnv(text) {

var match, retv;

eslintEnvPattern.lastIndex = 0;

while ((match = eslintEnvPattern.exec(text))) {
    retv = lodash.assign(retv || {}, parseListConfig(match[1]));
}

return retv;

}

/**

* Strips Unicode BOM from a given text.
*
* @param {string} text - A text to strip.
* @returns {string} The stripped text.
*/

function stripUnicodeBOM(text) {

/*
 * Check Unicode BOM.
 * In JavaScript, string data is stored as UTF-16, so BOM is 0xFEFF.
 * http://www.ecma-international.org/ecma-262/6.0/#sec-unicode-format-control-characters
 */
if (text.charCodeAt(0) === 0xFEFF) {
    return text.slice(1);
}
return text;

}

//—————————————————————————— // Public Interface //——————————————————————————

/**

* Object that is responsible for verifying JavaScript text
* @name eslint
*/

module.exports = (function() {

var api = Object.create(new EventEmitter()),
    messages = [],
    currentConfig = null,
    currentScopes = null,
    scopeMap = null,
    scopeManager = null,
    currentFilename = null,
    traverser = null,
    reportingConfig = [],
    sourceCode = null;

/**
 * Parses text into an AST. Moved out here because the try-catch prevents
 * optimization of functions, so it's best to keep the try-catch as isolated
 * as possible
 * @param {string} text The text to parse.
 * @param {Object} config The ESLint configuration object.
 * @returns {ASTNode} The AST if successful or null if not.
 * @private
 */
function parse(text, config) {

    var parser,
        parserOptions = {
            loc: true,
            range: true,
            raw: true,
            tokens: true,
            comment: true,
            attachComment: true
        };

    try {
        parser = require(config.parser);
    } catch (ex) {
        messages.push({
            ruleId: null,
            fatal: true,
            severity: 2,
            source: null,
            message: ex.message,
            line: 0,
            column: 0
        });

        return null;
    }

    // merge in any additional parser options
    if (config.parserOptions) {
        parserOptions = lodash.assign({}, config.parserOptions, parserOptions);
    }

    /*
     * Check for parsing errors first. If there's a parsing error, nothing
     * else can happen. However, a parsing error does not throw an error
     * from this method - it's just considered a fatal error message, a
     * problem that ESLint identified just like any other.
     */
    try {
        return parser.parse(text, parserOptions);
    } catch (ex) {

        // If the message includes a leading line number, strip it:
        var message = ex.message.replace(/^line \d+:/i, "").trim();
        var source = (ex.lineNumber) ? SourceCode.splitLines(text)[ex.lineNumber - 1] : null;

        messages.push({
            ruleId: null,
            fatal: true,
            severity: 2,
            source: source,
            message: "Parsing error: " + message,

            line: ex.lineNumber,
            column: ex.column
        });

        return null;
    }
}

/**
 * Get the severity level of a rule (0 - none, 1 - warning, 2 - error)
 * Returns 0 if the rule config is not valid (an Array or a number)
 * @param {Array|number} ruleConfig rule configuration
 * @returns {number} 0, 1, or 2, indicating rule severity
 */
function getRuleSeverity(ruleConfig) {
    if (typeof ruleConfig === "number") {
        return ruleConfig;
    } else if (Array.isArray(ruleConfig)) {
        return ruleConfig[0];
    } else {
        return 0;
    }
}

/**
 * Get the options for a rule (not including severity), if any
 * @param {Array|number} ruleConfig rule configuration
 * @returns {Array} of rule options, empty Array if none
 */
function getRuleOptions(ruleConfig) {
    if (Array.isArray(ruleConfig)) {
        return ruleConfig.slice(1);
    } else {
        return [];
    }
}

// set unlimited listeners (see https://github.com/eslint/eslint/issues/524)
api.setMaxListeners(0);

/**
 * Resets the internal state of the object.
 * @returns {void}
 */
api.reset = function() {
    this.removeAllListeners();
    messages = [];
    currentConfig = null;
    currentScopes = null;
    scopeMap = null;
    scopeManager = null;
    traverser = null;
    reportingConfig = [];
    sourceCode = null;
};

/**
 * Configuration object for the `verify` API. A JS representation of the eslintrc files.
 * @typedef {Object} ESLintConfig
 * @property {Object} rules The rule configuration to verify against.
 * @property {string} [parser] Parser to use when generatig the AST.
 * @property {Object} [parserOptions] Options for the parsed used.
 * @property {Object} [settings] Global settings passed to each rule.
 * @property {Object} [env] The environment to verify in.
 * @property {Object} [globals] Available globalsto the code.
 */

/**
 * Verifies the text against the rules specified by the second argument.
 * @param {string|SourceCode} textOrSourceCode The text to parse or a SourceCode object.
 * @param {ESLintConfig} config An ESLintConfig instance to configure everything.
 * @param {(string|Object)} [filenameOrOptions] The optional filename of the file being checked.
 *      If this is not set, the filename will default to '<input>' in the rule context. If
 *      an object, then it has "filename", "saveState", and "allowInlineConfig" properties.
 * @param {boolean} [saveState] Indicates if the state from the last run should be saved.
 *      Mostly useful for testing purposes.
 * @param {boolean} [filenameOrOptions.allowInlineConfig] Allow/disallow inline comments' ability to change config once it is set. Defaults to true if not supplied.
 *      Useful if you want to validate JS without comments overriding rules.
 * @returns {Object[]} The results as an array of messages or null if no messages.
 */
api.verify = function(textOrSourceCode, config, filenameOrOptions, saveState) {

    var ast,
        shebang,
        ecmaFeatures,
        ecmaVersion,
        allowInlineConfig,
        text = (typeof textOrSourceCode === "string") ? textOrSourceCode : null;

    // evaluate arguments
    if (typeof filenameOrOptions === "object") {
        currentFilename = filenameOrOptions.filename;
        allowInlineConfig = filenameOrOptions.allowInlineConfig;
        saveState = filenameOrOptions.saveState;
    } else {
        currentFilename = filenameOrOptions;
    }

    if (!saveState) {
        this.reset();
    }

    // search and apply "eslint-env *".
    var envInFile = findEslintEnv(text || textOrSourceCode.text);

    if (envInFile) {
        if (!config || !config.env) {
            config = lodash.assign({}, config || {}, {env: envInFile});
        } else {
            config = lodash.assign({}, config);
            config.env = lodash.assign({}, config.env, envInFile);
        }
    }

    // process initial config to make it safe to extend
    config = prepareConfig(config || {});

    // only do this for text
    if (text !== null) {

        // there's no input, just exit here
        if (text.trim().length === 0) {
            sourceCode = new SourceCode(text, blankScriptAST);
            return messages;
        }

        ast = parse(
            stripUnicodeBOM(text).replace(/^#!([^\r\n]+)/, function(match, captured) {
                shebang = captured;
                return "//" + captured;
            }),
            config
        );

        if (ast) {
            sourceCode = new SourceCode(text, ast);
        }

    } else {
        sourceCode = textOrSourceCode;
        ast = sourceCode.ast;
    }

    // if espree failed to parse the file, there's no sense in setting up rules
    if (ast) {

        // parse global comments and modify config
        if (allowInlineConfig !== false) {
            config = modifyConfigsFromComments(currentFilename, ast, config, reportingConfig, messages);
        }

        // ensure that severities are normalized in the config
        ConfigOps.normalize(config);

        // enable appropriate rules
        Object.keys(config.rules).filter(function(key) {
            return getRuleSeverity(config.rules[key]) > 0;
        }).forEach(function(key) {
            var ruleCreator,
                severity,
                options,
                rule;

            ruleCreator = rules.get(key);

            if (!ruleCreator) {
                var replacementMsg = getRuleReplacementMessage(key);

                if (replacementMsg) {
                    ruleCreator = createStubRule(replacementMsg);
                } else {
                    ruleCreator = createStubRule("Definition for rule '" + key + "' was not found");
                }
                rules.define(key, ruleCreator);
            }

            severity = getRuleSeverity(config.rules[key]);
            options = getRuleOptions(config.rules[key]);

            try {
                var ruleContext = new RuleContext(
                    key, api, severity, options,
                    config.settings, config.parserOptions, config.parser, ruleCreator.meta);

                rule = ruleCreator.create ? ruleCreator.create(ruleContext) :
                    ruleCreator(ruleContext);

                // add all the node types as listeners
                Object.keys(rule).forEach(function(nodeType) {
                    api.on(nodeType, timing.enabled
                        ? timing.time(key, rule[nodeType])
                        : rule[nodeType]
                    );
                });
            } catch (ex) {
                ex.message = "Error while loading rule '" + key + "': " + ex.message;
                throw ex;
            }
        });

        // save config so rules can access as necessary
        currentConfig = config;
        traverser = new Traverser();

        ecmaFeatures = currentConfig.parserOptions.ecmaFeatures || {};
        ecmaVersion = currentConfig.parserOptions.ecmaVersion || 5;

        // gather scope data that may be needed by the rules
        scopeManager = escope.analyze(ast, {
            ignoreEval: true,
            nodejsScope: ecmaFeatures.globalReturn,
            impliedStrict: ecmaFeatures.impliedStrict,
            ecmaVersion: ecmaVersion,
            sourceType: currentConfig.parserOptions.sourceType || "script",
            fallback: Traverser.getKeys
        });

        currentScopes = scopeManager.scopes;

        /*
         * Index the scopes by the start range of their block for efficient
         * lookup in getScope.
         */
        scopeMap = [];

        currentScopes.forEach(function(scope, index) {
            var range = scope.block.range[0];

            /*
             * Sometimes two scopes are returned for a given node. This is
             * handled later in a known way, so just don't overwrite here.
             */
            if (!scopeMap[range]) {
                scopeMap[range] = index;
            }
        });

        // augment global scope with declared global variables
        addDeclaredGlobals(ast, currentScopes[0], currentConfig);

        // remove shebang comments
        if (shebang && ast.comments.length && ast.comments[0].value === shebang) {
            ast.comments.splice(0, 1);

            if (ast.body.length && ast.body[0].leadingComments && ast.body[0].leadingComments[0].value === shebang) {
                ast.body[0].leadingComments.splice(0, 1);
            }
        }

        var eventGenerator = new NodeEventGenerator(api);

        eventGenerator = new CodePathAnalyzer(eventGenerator);
        eventGenerator = new CommentEventGenerator(eventGenerator, sourceCode);

        /*
         * Each node has a type property. Whenever a particular type of
         * node is found, an event is fired. This allows any listeners to
         * automatically be informed that this type of node has been found
         * and react accordingly.
         */
        traverser.traverse(ast, {
            enter: function(node, parent) {
                node.parent = parent;
                eventGenerator.enterNode(node);
            },
            leave: function(node) {
                eventGenerator.leaveNode(node);
            }
        });
    }

    // sort by line and column
    messages.sort(function(a, b) {
        var lineDiff = a.line - b.line;

        if (lineDiff === 0) {
            return a.column - b.column;
        } else {
            return lineDiff;
        }
    });

    return messages;
};

/**
 * Reports a message from one of the rules.
 * @param {string} ruleId The ID of the rule causing the message.
 * @param {number} severity The severity level of the rule as configured.
 * @param {ASTNode} node The AST node that the message relates to.
 * @param {Object=} location An object containing the error line and column
 *      numbers. If location is not provided the node's start location will
 *      be used.
 * @param {string} message The actual message.
 * @param {Object} opts Optional template data which produces a formatted message
 *     with symbols being replaced by this object's values.
 * @param {Object} fix A fix command description.
 * @param {Object} meta Metadata of the rule
 * @returns {void}
 */
api.report = function(ruleId, severity, node, location, message, opts, fix, meta) {
    if (node) {
        assert.strictEqual(typeof node, "object", "Node must be an object");
    }

    if (typeof location === "string") {
        assert.ok(node, "Node must be provided when reporting error if location is not provided");

        meta = fix;
        fix = opts;
        opts = message;
        message = location;
        location = node.loc.start;
    }

    // else, assume location was provided, so node may be omitted

    if (isDisabledByReportingConfig(reportingConfig, ruleId, location)) {
        return;
    }

    if (opts) {
        message = message.replace(/\{\{\s*(.+?)\s*\}\}/g, function(fullMatch, term) {
            if (term in opts) {
                return opts[term];
            }

            // Preserve old behavior: If parameter name not provided, don't replace it.
            return fullMatch;
        });
    }

    var problem = {
        ruleId: ruleId,
        severity: severity,
        message: message,
        line: location.line,
        column: location.column + 1,   // switch to 1-base instead of 0-base
        nodeType: node && node.type,
        source: sourceCode.lines[location.line - 1] || ""
    };

    // ensure there's range and text properties, otherwise it's not a valid fix
    if (fix && Array.isArray(fix.range) && (typeof fix.text === "string")) {

        // If rule uses fix, has metadata, but has no metadata.fixable, we should throw
        if (meta && !meta.fixable) {
            throw new Error("Fixable rules should export a `meta.fixable` property.");
        }

        problem.fix = fix;
    }

    messages.push(problem);
};

/**
 * Gets the SourceCode object representing the parsed source.
 * @returns {SourceCode} The SourceCode object.
 */
api.getSourceCode = function() {
    return sourceCode;
};

// methods that exist on SourceCode object
var externalMethods = {
    getSource: "getText",
    getSourceLines: "getLines",
    getAllComments: "getAllComments",
    getNodeByRangeIndex: "getNodeByRangeIndex",
    getComments: "getComments",
    getJSDocComment: "getJSDocComment",
    getFirstToken: "getFirstToken",
    getFirstTokens: "getFirstTokens",
    getLastToken: "getLastToken",
    getLastTokens: "getLastTokens",
    getTokenAfter: "getTokenAfter",
    getTokenBefore: "getTokenBefore",
    getTokenByRangeStart: "getTokenByRangeStart",
    getTokens: "getTokens",
    getTokensAfter: "getTokensAfter",
    getTokensBefore: "getTokensBefore",
    getTokensBetween: "getTokensBetween"
};

// copy over methods
Object.keys(externalMethods).forEach(function(methodName) {
    var exMethodName = externalMethods[methodName];

    // All functions expected to have less arguments than 5.
    api[methodName] = function(a, b, c, d, e) {
        if (sourceCode) {
            return sourceCode[exMethodName](a, b, c, d, e);
        }
        return null;
    };
});

/**
 * Gets nodes that are ancestors of current node.
 * @returns {ASTNode[]} Array of objects representing ancestors.
 */
api.getAncestors = function() {
    return traverser.parents();
};

/**
 * Gets the scope for the current node.
 * @returns {Object} An object representing the current node's scope.
 */
api.getScope = function() {
    var parents = traverser.parents(),
        scope = currentScopes[0];

    // Don't do this for Program nodes - they have no parents
    if (parents.length) {

        // if current node introduces a scope, add it to the list
        var current = traverser.current();

        if (currentConfig.parserOptions.ecmaVersion >= 6) {
            if (["BlockStatement", "SwitchStatement", "CatchClause", "FunctionDeclaration", "FunctionExpression", "ArrowFunctionExpression"].indexOf(current.type) >= 0) {
                parents.push(current);
            }
        } else {
            if (["FunctionDeclaration", "FunctionExpression", "ArrowFunctionExpression"].indexOf(current.type) >= 0) {
                parents.push(current);
            }
        }

        // Ascend the current node's parents
        for (var i = parents.length - 1; i >= 0; --i) {

            // Get the innermost scope
            scope = scopeManager.acquire(parents[i], true);
            if (scope) {
                if (scope.type === "function-expression-name") {
                    return scope.childScopes[0];
                } else {
                    return scope;
                }
            }

        }

    }

    return currentScopes[0];
};

/**
 * Record that a particular variable has been used in code
 * @param {string} name The name of the variable to mark as used
 * @returns {boolean} True if the variable was found and marked as used,
 *      false if not.
 */
api.markVariableAsUsed = function(name) {
    var scope = this.getScope(),
        hasGlobalReturn = currentConfig.parserOptions.ecmaFeatures && currentConfig.parserOptions.ecmaFeatures.globalReturn,
        specialScope = hasGlobalReturn || currentConfig.parserOptions.sourceType === "module",
        variables,
        i,
        len;

    // Special Node.js scope means we need to start one level deeper
    if (scope.type === "global" && specialScope) {
        scope = scope.childScopes[0];
    }

    do {
        variables = scope.variables;
        for (i = 0, len = variables.length; i < len; i++) {
            if (variables[i].name === name) {
                variables[i].eslintUsed = true;
                return true;
            }
        }
    } while ((scope = scope.upper));

    return false;
};

/**
 * Gets the filename for the currently parsed source.
 * @returns {string} The filename associated with the source being parsed.
 *     Defaults to "<input>" if no filename info is present.
 */
api.getFilename = function() {
    if (typeof currentFilename === "string") {
        return currentFilename;
    } else {
        return "<input>";
    }
};

/**
 * Defines a new linting rule.
 * @param {string} ruleId A unique rule identifier
 * @param {Function} ruleModule Function from context to object mapping AST node types to event handlers
 * @returns {void}
 */
var defineRule = api.defineRule = function(ruleId, ruleModule) {
    rules.define(ruleId, ruleModule);
};

/**
 * Defines many new linting rules.
 * @param {object} rulesToDefine map from unique rule identifier to rule
 * @returns {void}
 */
api.defineRules = function(rulesToDefine) {
    Object.getOwnPropertyNames(rulesToDefine).forEach(function(ruleId) {
        defineRule(ruleId, rulesToDefine[ruleId]);
    });
};

/**
 * Gets the default eslint configuration.
 * @returns {Object} Object mapping rule IDs to their default configurations
 */
api.defaults = function() {
    return require("../conf/eslint.json");
};

/**
 * Gets variables that are declared by a specified node.
 *
 * The variables are its `defs[].node` or `defs[].parent` is same as the specified node.
 * Specifically, below:
 *
 * - `VariableDeclaration` - variables of its all declarators.
 * - `VariableDeclarator` - variables.
 * - `FunctionDeclaration`/`FunctionExpression` - its function name and parameters.
 * - `ArrowFunctionExpression` - its parameters.
 * - `ClassDeclaration`/`ClassExpression` - its class name.
 * - `CatchClause` - variables of its exception.
 * - `ImportDeclaration` - variables of  its all specifiers.
 * - `ImportSpecifier`/`ImportDefaultSpecifier`/`ImportNamespaceSpecifier` - a variable.
 * - others - always an empty array.
 *
 * @param {ASTNode} node A node to get.
 * @returns {escope.Variable[]} Variables that are declared by the node.
 */
api.getDeclaredVariables = function(node) {
    return (scopeManager && scopeManager.getDeclaredVariables(node)) || [];
};

return api;

}());

},{“../conf/blank-script.json”:1,“../conf/eslint.json”:3,“../conf/replacements.json”:4,“./code-path-analysis/code-path-analyzer”:125,“./config/config-ops”:132,“./config/config-validator”:133,“./config/environments”:134,“./rule-context”:137,“./rules”:138,“./timing”:358,“./util/comment-event-generator”:360,“./util/node-event-generator”:362,“./util/source-code”:364,“./util/traverser”:365,“assert”:5,“escope”:75,“events”:94,“levn”:106,“lodash”:108}],136:[function(require,module,exports){ module.exports = function() {

var rules = Object.create(null);
rules["accessor-pairs"] = require("./rules/accessor-pairs");
rules["array-bracket-spacing"] = require("./rules/array-bracket-spacing");
rules["array-callback-return"] = require("./rules/array-callback-return");
rules["arrow-body-style"] = require("./rules/arrow-body-style");
rules["arrow-parens"] = require("./rules/arrow-parens");
rules["arrow-spacing"] = require("./rules/arrow-spacing");
rules["block-scoped-var"] = require("./rules/block-scoped-var");
rules["block-spacing"] = require("./rules/block-spacing");
rules["brace-style"] = require("./rules/brace-style");
rules["callback-return"] = require("./rules/callback-return");
rules["camelcase"] = require("./rules/camelcase");
rules["comma-dangle"] = require("./rules/comma-dangle");
rules["comma-spacing"] = require("./rules/comma-spacing");
rules["comma-style"] = require("./rules/comma-style");
rules["complexity"] = require("./rules/complexity");
rules["computed-property-spacing"] = require("./rules/computed-property-spacing");
rules["consistent-return"] = require("./rules/consistent-return");
rules["consistent-this"] = require("./rules/consistent-this");
rules["constructor-super"] = require("./rules/constructor-super");
rules["curly"] = require("./rules/curly");
rules["default-case"] = require("./rules/default-case");
rules["dot-location"] = require("./rules/dot-location");
rules["dot-notation"] = require("./rules/dot-notation");
rules["eol-last"] = require("./rules/eol-last");
rules["eqeqeq"] = require("./rules/eqeqeq");
rules["func-names"] = require("./rules/func-names");
rules["func-style"] = require("./rules/func-style");
rules["generator-star-spacing"] = require("./rules/generator-star-spacing");
rules["global-require"] = require("./rules/global-require");
rules["guard-for-in"] = require("./rules/guard-for-in");
rules["handle-callback-err"] = require("./rules/handle-callback-err");
rules["id-blacklist"] = require("./rules/id-blacklist");
rules["id-length"] = require("./rules/id-length");
rules["id-match"] = require("./rules/id-match");
rules["indent"] = require("./rules/indent");
rules["init-declarations"] = require("./rules/init-declarations");
rules["jsx-quotes"] = require("./rules/jsx-quotes");
rules["key-spacing"] = require("./rules/key-spacing");
rules["keyword-spacing"] = require("./rules/keyword-spacing");
rules["linebreak-style"] = require("./rules/linebreak-style");
rules["lines-around-comment"] = require("./rules/lines-around-comment");
rules["max-depth"] = require("./rules/max-depth");
rules["max-len"] = require("./rules/max-len");
rules["max-lines"] = require("./rules/max-lines");
rules["max-nested-callbacks"] = require("./rules/max-nested-callbacks");
rules["max-params"] = require("./rules/max-params");
rules["max-statements-per-line"] = require("./rules/max-statements-per-line");
rules["max-statements"] = require("./rules/max-statements");
rules["new-cap"] = require("./rules/new-cap");
rules["new-parens"] = require("./rules/new-parens");
rules["newline-after-var"] = require("./rules/newline-after-var");
rules["newline-before-return"] = require("./rules/newline-before-return");
rules["newline-per-chained-call"] = require("./rules/newline-per-chained-call");
rules["no-alert"] = require("./rules/no-alert");
rules["no-array-constructor"] = require("./rules/no-array-constructor");
rules["no-bitwise"] = require("./rules/no-bitwise");
rules["no-caller"] = require("./rules/no-caller");
rules["no-case-declarations"] = require("./rules/no-case-declarations");
rules["no-catch-shadow"] = require("./rules/no-catch-shadow");
rules["no-class-assign"] = require("./rules/no-class-assign");
rules["no-cond-assign"] = require("./rules/no-cond-assign");
rules["no-confusing-arrow"] = require("./rules/no-confusing-arrow");
rules["no-console"] = require("./rules/no-console");
rules["no-const-assign"] = require("./rules/no-const-assign");
rules["no-constant-condition"] = require("./rules/no-constant-condition");
rules["no-continue"] = require("./rules/no-continue");
rules["no-control-regex"] = require("./rules/no-control-regex");
rules["no-debugger"] = require("./rules/no-debugger");
rules["no-delete-var"] = require("./rules/no-delete-var");
rules["no-div-regex"] = require("./rules/no-div-regex");
rules["no-dupe-args"] = require("./rules/no-dupe-args");
rules["no-dupe-class-members"] = require("./rules/no-dupe-class-members");
rules["no-dupe-keys"] = require("./rules/no-dupe-keys");
rules["no-duplicate-case"] = require("./rules/no-duplicate-case");
rules["no-duplicate-imports"] = require("./rules/no-duplicate-imports");
rules["no-else-return"] = require("./rules/no-else-return");
rules["no-empty-character-class"] = require("./rules/no-empty-character-class");
rules["no-empty-function"] = require("./rules/no-empty-function");
rules["no-empty-pattern"] = require("./rules/no-empty-pattern");
rules["no-empty"] = require("./rules/no-empty");
rules["no-eq-null"] = require("./rules/no-eq-null");
rules["no-eval"] = require("./rules/no-eval");
rules["no-ex-assign"] = require("./rules/no-ex-assign");
rules["no-extend-native"] = require("./rules/no-extend-native");
rules["no-extra-bind"] = require("./rules/no-extra-bind");
rules["no-extra-boolean-cast"] = require("./rules/no-extra-boolean-cast");
rules["no-extra-label"] = require("./rules/no-extra-label");
rules["no-extra-parens"] = require("./rules/no-extra-parens");
rules["no-extra-semi"] = require("./rules/no-extra-semi");
rules["no-fallthrough"] = require("./rules/no-fallthrough");
rules["no-floating-decimal"] = require("./rules/no-floating-decimal");
rules["no-func-assign"] = require("./rules/no-func-assign");
rules["no-implicit-coercion"] = require("./rules/no-implicit-coercion");
rules["no-implicit-globals"] = require("./rules/no-implicit-globals");
rules["no-implied-eval"] = require("./rules/no-implied-eval");
rules["no-inline-comments"] = require("./rules/no-inline-comments");
rules["no-inner-declarations"] = require("./rules/no-inner-declarations");
rules["no-invalid-regexp"] = require("./rules/no-invalid-regexp");
rules["no-invalid-this"] = require("./rules/no-invalid-this");
rules["no-irregular-whitespace"] = require("./rules/no-irregular-whitespace");
rules["no-iterator"] = require("./rules/no-iterator");
rules["no-label-var"] = require("./rules/no-label-var");
rules["no-labels"] = require("./rules/no-labels");
rules["no-lone-blocks"] = require("./rules/no-lone-blocks");
rules["no-lonely-if"] = require("./rules/no-lonely-if");
rules["no-loop-func"] = require("./rules/no-loop-func");
rules["no-magic-numbers"] = require("./rules/no-magic-numbers");
rules["no-mixed-operators"] = require("./rules/no-mixed-operators");
rules["no-mixed-requires"] = require("./rules/no-mixed-requires");
rules["no-mixed-spaces-and-tabs"] = require("./rules/no-mixed-spaces-and-tabs");
rules["no-multi-spaces"] = require("./rules/no-multi-spaces");
rules["no-multi-str"] = require("./rules/no-multi-str");
rules["no-multiple-empty-lines"] = require("./rules/no-multiple-empty-lines");
rules["no-native-reassign"] = require("./rules/no-native-reassign");
rules["no-negated-condition"] = require("./rules/no-negated-condition");
rules["no-negated-in-lhs"] = require("./rules/no-negated-in-lhs");
rules["no-nested-ternary"] = require("./rules/no-nested-ternary");
rules["no-new-func"] = require("./rules/no-new-func");
rules["no-new-object"] = require("./rules/no-new-object");
rules["no-new-require"] = require("./rules/no-new-require");
rules["no-new-symbol"] = require("./rules/no-new-symbol");
rules["no-new-wrappers"] = require("./rules/no-new-wrappers");
rules["no-new"] = require("./rules/no-new");
rules["no-obj-calls"] = require("./rules/no-obj-calls");
rules["no-octal-escape"] = require("./rules/no-octal-escape");
rules["no-octal"] = require("./rules/no-octal");
rules["no-param-reassign"] = require("./rules/no-param-reassign");
rules["no-path-concat"] = require("./rules/no-path-concat");
rules["no-plusplus"] = require("./rules/no-plusplus");
rules["no-process-env"] = require("./rules/no-process-env");
rules["no-process-exit"] = require("./rules/no-process-exit");
rules["no-proto"] = require("./rules/no-proto");
rules["no-prototype-builtins"] = require("./rules/no-prototype-builtins");
rules["no-redeclare"] = require("./rules/no-redeclare");
rules["no-regex-spaces"] = require("./rules/no-regex-spaces");
rules["no-restricted-globals"] = require("./rules/no-restricted-globals");
rules["no-restricted-imports"] = require("./rules/no-restricted-imports");
rules["no-restricted-modules"] = require("./rules/no-restricted-modules");
rules["no-restricted-syntax"] = require("./rules/no-restricted-syntax");
rules["no-return-assign"] = require("./rules/no-return-assign");
rules["no-script-url"] = require("./rules/no-script-url");
rules["no-self-assign"] = require("./rules/no-self-assign");
rules["no-self-compare"] = require("./rules/no-self-compare");
rules["no-sequences"] = require("./rules/no-sequences");
rules["no-shadow-restricted-names"] = require("./rules/no-shadow-restricted-names");
rules["no-shadow"] = require("./rules/no-shadow");
rules["no-spaced-func"] = require("./rules/no-spaced-func");
rules["no-sparse-arrays"] = require("./rules/no-sparse-arrays");
rules["no-sync"] = require("./rules/no-sync");
rules["no-ternary"] = require("./rules/no-ternary");
rules["no-this-before-super"] = require("./rules/no-this-before-super");
rules["no-throw-literal"] = require("./rules/no-throw-literal");
rules["no-trailing-spaces"] = require("./rules/no-trailing-spaces");
rules["no-undef-init"] = require("./rules/no-undef-init");
rules["no-undef"] = require("./rules/no-undef");
rules["no-undefined"] = require("./rules/no-undefined");
rules["no-underscore-dangle"] = require("./rules/no-underscore-dangle");
rules["no-unexpected-multiline"] = require("./rules/no-unexpected-multiline");
rules["no-unmodified-loop-condition"] = require("./rules/no-unmodified-loop-condition");
rules["no-unneeded-ternary"] = require("./rules/no-unneeded-ternary");
rules["no-unreachable"] = require("./rules/no-unreachable");
rules["no-unsafe-finally"] = require("./rules/no-unsafe-finally");
rules["no-unused-expressions"] = require("./rules/no-unused-expressions");
rules["no-unused-labels"] = require("./rules/no-unused-labels");
rules["no-unused-vars"] = require("./rules/no-unused-vars");
rules["no-use-before-define"] = require("./rules/no-use-before-define");
rules["no-useless-call"] = require("./rules/no-useless-call");
rules["no-useless-computed-key"] = require("./rules/no-useless-computed-key");
rules["no-useless-concat"] = require("./rules/no-useless-concat");
rules["no-useless-constructor"] = require("./rules/no-useless-constructor");
rules["no-useless-escape"] = require("./rules/no-useless-escape");
rules["no-useless-rename"] = require("./rules/no-useless-rename");
rules["no-var"] = require("./rules/no-var");
rules["no-void"] = require("./rules/no-void");
rules["no-warning-comments"] = require("./rules/no-warning-comments");
rules["no-whitespace-before-property"] = require("./rules/no-whitespace-before-property");
rules["no-with"] = require("./rules/no-with");
rules["object-curly-newline"] = require("./rules/object-curly-newline");
rules["object-curly-spacing"] = require("./rules/object-curly-spacing");
rules["object-property-newline"] = require("./rules/object-property-newline");
rules["object-shorthand"] = require("./rules/object-shorthand");
rules["one-var-declaration-per-line"] = require("./rules/one-var-declaration-per-line");
rules["one-var"] = require("./rules/one-var");
rules["operator-assignment"] = require("./rules/operator-assignment");
rules["operator-linebreak"] = require("./rules/operator-linebreak");
rules["padded-blocks"] = require("./rules/padded-blocks");
rules["prefer-arrow-callback"] = require("./rules/prefer-arrow-callback");
rules["prefer-const"] = require("./rules/prefer-const");
rules["prefer-reflect"] = require("./rules/prefer-reflect");
rules["prefer-rest-params"] = require("./rules/prefer-rest-params");
rules["prefer-spread"] = require("./rules/prefer-spread");
rules["prefer-template"] = require("./rules/prefer-template");
rules["quote-props"] = require("./rules/quote-props");
rules["quotes"] = require("./rules/quotes");
rules["radix"] = require("./rules/radix");
rules["require-jsdoc"] = require("./rules/require-jsdoc");
rules["require-yield"] = require("./rules/require-yield");
rules["rest-spread-spacing"] = require("./rules/rest-spread-spacing");
rules["semi-spacing"] = require("./rules/semi-spacing");
rules["semi"] = require("./rules/semi");
rules["sort-imports"] = require("./rules/sort-imports");
rules["sort-vars"] = require("./rules/sort-vars");
rules["space-before-blocks"] = require("./rules/space-before-blocks");
rules["space-before-function-paren"] = require("./rules/space-before-function-paren");
rules["space-in-parens"] = require("./rules/space-in-parens");
rules["space-infix-ops"] = require("./rules/space-infix-ops");
rules["space-unary-ops"] = require("./rules/space-unary-ops");
rules["spaced-comment"] = require("./rules/spaced-comment");
rules["strict"] = require("./rules/strict");
rules["template-curly-spacing"] = require("./rules/template-curly-spacing");
rules["unicode-bom"] = require("./rules/unicode-bom");
rules["use-isnan"] = require("./rules/use-isnan");
rules["valid-jsdoc"] = require("./rules/valid-jsdoc");
rules["valid-typeof"] = require("./rules/valid-typeof");
rules["vars-on-top"] = require("./rules/vars-on-top");
rules["wrap-iife"] = require("./rules/wrap-iife");
rules["wrap-regex"] = require("./rules/wrap-regex");
rules["yield-star-spacing"] = require("./rules/yield-star-spacing");
rules["yoda"] = require("./rules/yoda");

return rules;

}; },{“./rules/accessor-pairs”:139,“./rules/array-bracket-spacing”:140,“./rules/array-callback-return”:141,“./rules/arrow-body-style”:142,“./rules/arrow-parens”:143,“./rules/arrow-spacing”:144,“./rules/block-scoped-var”:145,“./rules/block-spacing”:146,“./rules/brace-style”:147,“./rules/callback-return”:148,“./rules/camelcase”:149,“./rules/comma-dangle”:150,“./rules/comma-spacing”:151,“./rules/comma-style”:152,“./rules/complexity”:153,“./rules/computed-property-spacing”:154,“./rules/consistent-return”:155,“./rules/consistent-this”:156,“./rules/constructor-super”:157,“./rules/curly”:158,“./rules/default-case”:159,“./rules/dot-location”:160,“./rules/dot-notation”:161,“./rules/eol-last”:162,“./rules/eqeqeq”:163,“./rules/func-names”:164,“./rules/func-style”:165,“./rules/generator-star-spacing”:166,“./rules/global-require”:167,“./rules/guard-for-in”:168,“./rules/handle-callback-err”:169,“./rules/id-blacklist”:170,“./rules/id-length”:171,“./rules/id-match”:172,“./rules/indent”:173,“./rules/init-declarations”:174,“./rules/jsx-quotes”:175,“./rules/key-spacing”:176,“./rules/keyword-spacing”:177,“./rules/linebreak-style”:178,“./rules/lines-around-comment”:179,“./rules/max-depth”:180,“./rules/max-len”:181,“./rules/max-lines”:182,“./rules/max-nested-callbacks”:183,“./rules/max-params”:184,“./rules/max-statements”:186,“./rules/max-statements-per-line”:185,“./rules/new-cap”:187,“./rules/new-parens”:188,“./rules/newline-after-var”:189,“./rules/newline-before-return”:190,“./rules/newline-per-chained-call”:191,“./rules/no-alert”:192,“./rules/no-array-constructor”:193,“./rules/no-bitwise”:194,“./rules/no-caller”:195,“./rules/no-case-declarations”:196,“./rules/no-catch-shadow”:197,“./rules/no-class-assign”:198,“./rules/no-cond-assign”:199,“./rules/no-confusing-arrow”:200,“./rules/no-console”:201,“./rules/no-const-assign”:202,“./rules/no-constant-condition”:203,“./rules/no-continue”:204,“./rules/no-control-regex”:205,“./rules/no-debugger”:206,“./rules/no-delete-var”:207,“./rules/no-div-regex”:208,“./rules/no-dupe-args”:209,“./rules/no-dupe-class-members”:210,“./rules/no-dupe-keys”:211,“./rules/no-duplicate-case”:212,“./rules/no-duplicate-imports”:213,“./rules/no-else-return”:214,“./rules/no-empty”:218,“./rules/no-empty-character-class”:215,“./rules/no-empty-function”:216,“./rules/no-empty-pattern”:217,“./rules/no-eq-null”:219,“./rules/no-eval”:220,“./rules/no-ex-assign”:221,“./rules/no-extend-native”:222,“./rules/no-extra-bind”:223,“./rules/no-extra-boolean-cast”:224,“./rules/no-extra-label”:225,“./rules/no-extra-parens”:226,“./rules/no-extra-semi”:227,“./rules/no-fallthrough”:228,“./rules/no-floating-decimal”:229,“./rules/no-func-assign”:230,“./rules/no-implicit-coercion”:231,“./rules/no-implicit-globals”:232,“./rules/no-implied-eval”:233,“./rules/no-inline-comments”:234,“./rules/no-inner-declarations”:235,“./rules/no-invalid-regexp”:236,“./rules/no-invalid-this”:237,“./rules/no-irregular-whitespace”:238,“./rules/no-iterator”:239,“./rules/no-label-var”:240,“./rules/no-labels”:241,“./rules/no-lone-blocks”:242,“./rules/no-lonely-if”:243,“./rules/no-loop-func”:244,“./rules/no-magic-numbers”:245,“./rules/no-mixed-operators”:246,“./rules/no-mixed-requires”:247,“./rules/no-mixed-spaces-and-tabs”:248,“./rules/no-multi-spaces”:249,“./rules/no-multi-str”:250,“./rules/no-multiple-empty-lines”:251,“./rules/no-native-reassign”:252,“./rules/no-negated-condition”:253,“./rules/no-negated-in-lhs”:254,“./rules/no-nested-ternary”:255,“./rules/no-new”:261,“./rules/no-new-func”:256,“./rules/no-new-object”:257,“./rules/no-new-require”:258,“./rules/no-new-symbol”:259,“./rules/no-new-wrappers”:260,“./rules/no-obj-calls”:262,“./rules/no-octal”:264,“./rules/no-octal-escape”:263,“./rules/no-param-reassign”:265,“./rules/no-path-concat”:266,“./rules/no-plusplus”:267,“./rules/no-process-env”:268,“./rules/no-process-exit”:269,“./rules/no-proto”:270,“./rules/no-prototype-builtins”:271,“./rules/no-redeclare”:272,“./rules/no-regex-spaces”:273,“./rules/no-restricted-globals”:274,“./rules/no-restricted-imports”:275,“./rules/no-restricted-modules”:276,“./rules/no-restricted-syntax”:277,“./rules/no-return-assign”:278,“./rules/no-script-url”:279,“./rules/no-self-assign”:280,“./rules/no-self-compare”:281,“./rules/no-sequences”:282,“./rules/no-shadow”:284,“./rules/no-shadow-restricted-names”:283,“./rules/no-spaced-func”:285,“./rules/no-sparse-arrays”:286,“./rules/no-sync”:287,“./rules/no-ternary”:288,“./rules/no-this-before-super”:289,“./rules/no-throw-literal”:290,“./rules/no-trailing-spaces”:291,“./rules/no-undef”:293,“./rules/no-undef-init”:292,“./rules/no-undefined”:294,“./rules/no-underscore-dangle”:295,“./rules/no-unexpected-multiline”:296,“./rules/no-unmodified-loop-condition”:297,“./rules/no-unneeded-ternary”:298,“./rules/no-unreachable”:299,“./rules/no-unsafe-finally”:300,“./rules/no-unused-expressions”:301,“./rules/no-unused-labels”:302,“./rules/no-unused-vars”:303,“./rules/no-use-before-define”:304,“./rules/no-useless-call”:305,“./rules/no-useless-computed-key”:306,“./rules/no-useless-concat”:307,“./rules/no-useless-constructor”:308,“./rules/no-useless-escape”:309,“./rules/no-useless-rename”:310,“./rules/no-var”:311,“./rules/no-void”:312,“./rules/no-warning-comments”:313,“./rules/no-whitespace-before-property”:314,“./rules/no-with”:315,“./rules/object-curly-newline”:316,“./rules/object-curly-spacing”:317,“./rules/object-property-newline”:318,“./rules/object-shorthand”:319,“./rules/one-var”:321,“./rules/one-var-declaration-per-line”:320,“./rules/operator-assignment”:322,“./rules/operator-linebreak”:323,“./rules/padded-blocks”:324,“./rules/prefer-arrow-callback”:325,“./rules/prefer-const”:326,“./rules/prefer-reflect”:327,“./rules/prefer-rest-params”:328,“./rules/prefer-spread”:329,“./rules/prefer-template”:330,“./rules/quote-props”:331,“./rules/quotes”:332,“./rules/radix”:333,“./rules/require-jsdoc”:334,“./rules/require-yield”:335,“./rules/rest-spread-spacing”:336,“./rules/semi”:338,“./rules/semi-spacing”:337,“./rules/sort-imports”:339,“./rules/sort-vars”:340,“./rules/space-before-blocks”:341,“./rules/space-before-function-paren”:342,“./rules/space-in-parens”:343,“./rules/space-infix-ops”:344,“./rules/space-unary-ops”:345,“./rules/spaced-comment”:346,“./rules/strict”:347,“./rules/template-curly-spacing”:348,“./rules/unicode-bom”:349,“./rules/use-isnan”:350,“./rules/valid-jsdoc”:351,“./rules/valid-typeof”:352,“./rules/vars-on-top”:353,“./rules/wrap-iife”:354,“./rules/wrap-regex”:355,“./rules/yield-star-spacing”:356,“./rules/yoda”:357}],137:[function(require,module,exports){ /**

* @fileoverview RuleContext utility for rules
* @author Nicholas C. Zakas
*/

“use strict”;

//—————————————————————————— // Requirements //——————————————————————————

var RuleFixer = require(“./util/rule-fixer”);

//—————————————————————————— // Constants //——————————————————————————

var PASSTHROUGHS = [

"getAncestors",
"getDeclaredVariables",
"getFilename",
"getScope",
"markVariableAsUsed",

// DEPRECATED
"getAllComments",
"getComments",
"getFirstToken",
"getFirstTokens",
"getJSDocComment",
"getLastToken",
"getLastTokens",
"getNodeByRangeIndex",
"getSource",
"getSourceLines",
"getTokenAfter",
"getTokenBefore",
"getTokenByRangeStart",
"getTokens",
"getTokensAfter",
"getTokensBefore",
"getTokensBetween"

];

//—————————————————————————— // Typedefs //——————————————————————————

/**

* An error message description
* @typedef {Object} MessageDescriptor
* @property {string} nodeType The type of node.
* @property {Location} loc The location of the problem.
* @property {string} message The problem message.
* @property {Object} [data] Optional data to use to fill in placeholders in the
*      message.
* @property {Function} fix The function to call that creates a fix command.
*/

//—————————————————————————— // Rule Definition //——————————————————————————

/**

* Acts as an abstraction layer between rules and the main eslint object.
* @constructor
* @param {string} ruleId The ID of the rule using this object.
* @param {eslint} eslint The eslint object.
* @param {number} severity The configured severity level of the rule.
* @param {Array} options The configuration information to be added to the rule.
* @param {Object} settings The configuration settings passed from the config file.
* @param {Object} parserOptions The parserOptions settings passed from the config file.
* @param {Object} parserPath The parser setting passed from the config file.
* @param {Object} meta The metadata of the rule
*/

function RuleContext(ruleId, eslint, severity, options, settings, parserOptions, parserPath, meta) {

// public.
this.id = ruleId;
this.options = options;
this.settings = settings;
this.parserOptions = parserOptions;
this.parserPath = parserPath;
this.meta = meta;

// private.
this.eslint = eslint;
this.severity = severity;

Object.freeze(this);

}

RuleContext.prototype = {

constructor: RuleContext,

/**
 * Passthrough to eslint.getSourceCode().
 * @returns {SourceCode} The SourceCode object for the code.
 */
getSourceCode: function() {
    return this.eslint.getSourceCode();
},

/**
 * Passthrough to eslint.report() that automatically assigns the rule ID and severity.
 * @param {ASTNode|MessageDescriptor} nodeOrDescriptor The AST node related to the message or a message
 *      descriptor.
 * @param {Object=} location The location of the error.
 * @param {string} message The message to display to the user.
 * @param {Object} opts Optional template data which produces a formatted message
 *     with symbols being replaced by this object's values.
 * @returns {void}
 */
report: function(nodeOrDescriptor, location, message, opts) {
    var descriptor,
        fix = null;

    // check to see if it's a new style call
    if (arguments.length === 1) {
        descriptor = nodeOrDescriptor;

        // if there's a fix specified, get it
        if (typeof descriptor.fix === "function") {
            fix = descriptor.fix(new RuleFixer());
        }

        this.eslint.report(
            this.id,
            this.severity,
            descriptor.node,
            descriptor.loc || descriptor.node.loc.start,
            descriptor.message,
            descriptor.data,
            fix,
            this.meta
        );

        return;
    }

    // old style call
    this.eslint.report(
        this.id,
        this.severity,
        nodeOrDescriptor,
        location,
        message,
        opts,
        this.meta
    );
}

};

// Copy over passthrough methods. All functions will have 5 or fewer parameters. PASSTHROUGHS.forEach(function(name) {

this[name] = function(a, b, c, d, e) {
    return this.eslint[name](a, b, c, d, e);
};

}, RuleContext.prototype);

module.exports = RuleContext;

},{“./util/rule-fixer”:363}],138:[function(require,module,exports){ /**

* @fileoverview Defines a storage for rules.
* @author Nicholas C. Zakas
*/

“use strict”;

//—————————————————————————— // Requirements //——————————————————————————

var loadRules = require(“./load-rules”);

//—————————————————————————— // Privates //——————————————————————————

var rules = Object.create(null);

//—————————————————————————— // Public Interface //——————————————————————————

/**

* Registers a rule module for rule id in storage.
* @param {string} ruleId Rule id (file name).
* @param {Function} ruleModule Rule handler.
* @returns {void}
*/

function define(ruleId, ruleModule) {

rules[ruleId] = ruleModule;

}

/**

* Loads and registers all rules from passed rules directory.
* @param {string} [rulesDir] Path to rules directory, may be relative. Defaults to `lib/rules`.
* @param {string} cwd Current working directory
* @returns {void}
*/

function load(rulesDir, cwd) {

var newRules = loadRules(rulesDir, cwd);

Object.keys(newRules).forEach(function(ruleId) {
    define(ruleId, newRules[ruleId]);
});

}

/**

* Registers all given rules of a plugin.
* @param {Object} pluginRules A key/value map of rule definitions.
* @param {string} pluginName The name of the plugin without prefix (`eslint-plugin-`).
* @returns {void}
*/

function importPlugin(pluginRules, pluginName) {

Object.keys(pluginRules).forEach(function(ruleId) {
    var qualifiedRuleId = pluginName + "/" + ruleId,
        rule = pluginRules[ruleId];

    define(qualifiedRuleId, rule);
});

}

/**

* Access rule handler by id (file name).
* @param {string} ruleId Rule id (file name).
* @returns {Function} Rule handler.
*/

function get(ruleId) {

if (typeof rules[ruleId] === "string") {
    return require(rules[ruleId]);
} else {
    return rules[ruleId];
}

}

/**

* Reset rules storage.
* Should be used only in tests.
* @returns {void}
*/

function testClear() {

rules = Object.create(null);

}

module.exports = {

define: define,
load: load,
import: importPlugin,
get: get,
testClear: testClear,

/**
 * Resets rules to its starting state. Use for tests only.
 * @returns {void}
 */
testReset: function() {
    testClear();
    load();
}

};

//—————————————————————————— // Initialization //——————————————————————————

// loads built-in rules load();

},{“./load-rules”:136}],139:[function(require,module,exports){ /**

* @fileoverview Rule to flag wrapping non-iife in parens
* @author Gyandeep Singh
*/

“use strict”;

//—————————————————————————— // Helpers //——————————————————————————

/**

* Checks whether or not a given node is an `Identifier` node which was named a given name.
* @param {ASTNode} node - A node to check.
* @param {string} name - An expected name of the node.
* @returns {boolean} `true` if the node is an `Identifier` node which was named as expected.
*/

function isIdentifier(node, name) {

return node.type === "Identifier" && node.name === name;

}

/**

* Checks whether or not a given node is an argument of a specified method call.
* @param {ASTNode} node - A node to check.
* @param {number} index - An expected index of the node in arguments.
* @param {string} object - An expected name of the object of the method.
* @param {string} property - An expected name of the method.
* @returns {boolean} `true` if the node is an argument of the specified method call.
*/

function isArgumentOfMethodCall(node, index, object, property) {

var parent = node.parent;

return (
    parent.type === "CallExpression" &&
    parent.callee.type === "MemberExpression" &&
    parent.callee.computed === false &&
    isIdentifier(parent.callee.object, object) &&
    isIdentifier(parent.callee.property, property) &&
    parent.arguments[index] === node
);

}

/**

* Checks whether or not a given node is a property descriptor.
* @param {ASTNode} node - A node to check.
* @returns {boolean} `true` if the node is a property descriptor.
*/

function isPropertyDescriptor(node) {

// Object.defineProperty(obj, "foo", {set: ...})
if (isArgumentOfMethodCall(node, 2, "Object", "defineProperty") ||
    isArgumentOfMethodCall(node, 2, "Reflect", "defineProperty")
) {
    return true;
}

/*
 * Object.defineProperties(obj, {foo: {set: ...}})
 * Object.create(proto, {foo: {set: ...}})
 */
node = node.parent.parent;

return node.type === "ObjectExpression" && (
    isArgumentOfMethodCall(node, 1, "Object", "create") ||
    isArgumentOfMethodCall(node, 1, "Object", "defineProperties")
);

}

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "Enforces getter/setter pairs in objects",
        category: "Best Practices",
        recommended: false
    },
    schema: [{
        type: "object",
        properties: {
            getWithoutSet: {
                type: "boolean"
            },
            setWithoutGet: {
                type: "boolean"
            }
        },
        additionalProperties: false
    }]
},
create: function(context) {
    var config = context.options[0] || {};
    var checkGetWithoutSet = config.getWithoutSet === true;
    var checkSetWithoutGet = config.setWithoutGet !== false;

    /**
     * Checks a object expression to see if it has setter and getter both present or none.
     * @param {ASTNode} node The node to check.
     * @returns {void}
     * @private
     */
    function checkLonelySetGet(node) {
        var isSetPresent = false;
        var isGetPresent = false;
        var isDescriptor = isPropertyDescriptor(node);

        for (var i = 0, end = node.properties.length; i < end; i++) {
            var property = node.properties[i];

            var propToCheck = "";

            if (property.kind === "init") {
                if (isDescriptor && !property.computed) {
                    propToCheck = property.key.name;
                }
            } else {
                propToCheck = property.kind;
            }

            switch (propToCheck) {
                case "set":
                    isSetPresent = true;
                    break;

                case "get":
                    isGetPresent = true;
                    break;

                default:

                    // Do nothing
            }

            if (isSetPresent && isGetPresent) {
                break;
            }
        }

        if (checkSetWithoutGet && isSetPresent && !isGetPresent) {
            context.report(node, "Getter is not present");
        } else if (checkGetWithoutSet && isGetPresent && !isSetPresent) {
            context.report(node, "Setter is not present");
        }
    }

    return {
        ObjectExpression: function(node) {
            if (checkSetWithoutGet || checkGetWithoutSet) {
                checkLonelySetGet(node);
            }
        }
    };
}

};

},{}],140:[function(require,module,exports){ /**

* @fileoverview Disallows or enforces spaces inside of array brackets.
* @author Jamund Ferguson
*/

“use strict”;

var astUtils = require(“../ast-utils”);

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "Enforce spacing inside array brackets",
        category: "Stylistic Issues",
        recommended: false
    },
    fixable: "whitespace",
    schema: [
        {
            enum: ["always", "never"]
        },
        {
            type: "object",
            properties: {
                singleValue: {
                    type: "boolean"
                },
                objectsInArrays: {
                    type: "boolean"
                },
                arraysInArrays: {
                    type: "boolean"
                }
            },
            additionalProperties: false
        }
    ]
},
create: function(context) {
    var spaced = context.options[0] === "always",
        sourceCode = context.getSourceCode();

    /**
     * Determines whether an option is set, relative to the spacing option.
     * If spaced is "always", then check whether option is set to false.
     * If spaced is "never", then check whether option is set to true.
     * @param {Object} option - The option to exclude.
     * @returns {boolean} Whether or not the property is excluded.
     */
    function isOptionSet(option) {
        return context.options[1] ? context.options[1][option] === !spaced : false;
    }

    var options = {
        spaced: spaced,
        singleElementException: isOptionSet("singleValue"),
        objectsInArraysException: isOptionSet("objectsInArrays"),
        arraysInArraysException: isOptionSet("arraysInArrays")
    };

    //--------------------------------------------------------------------------
    // Helpers
    //--------------------------------------------------------------------------

    /**
    * Reports that there shouldn't be a space after the first token
    * @param {ASTNode} node - The node to report in the event of an error.
    * @param {Token} token - The token to use for the report.
    * @returns {void}
    */
    function reportNoBeginningSpace(node, token) {
        context.report({
            node: node,
            loc: token.loc.start,
            message: "There should be no space after '" + token.value + "'",
            fix: function(fixer) {
                var nextToken = sourceCode.getTokenAfter(token);

                return fixer.removeRange([token.range[1], nextToken.range[0]]);
            }
        });
    }

    /**
    * Reports that there shouldn't be a space before the last token
    * @param {ASTNode} node - The node to report in the event of an error.
    * @param {Token} token - The token to use for the report.
    * @returns {void}
    */
    function reportNoEndingSpace(node, token) {
        context.report({
            node: node,
            loc: token.loc.start,
            message: "There should be no space before '" + token.value + "'",
            fix: function(fixer) {
                var previousToken = sourceCode.getTokenBefore(token);

                return fixer.removeRange([previousToken.range[1], token.range[0]]);
            }
        });
    }

    /**
    * Reports that there should be a space after the first token
    * @param {ASTNode} node - The node to report in the event of an error.
    * @param {Token} token - The token to use for the report.
    * @returns {void}
    */
    function reportRequiredBeginningSpace(node, token) {
        context.report({
            node: node,
            loc: token.loc.start,
            message: "A space is required after '" + token.value + "'",
            fix: function(fixer) {
                return fixer.insertTextAfter(token, " ");
            }
        });
    }

    /**
    * Reports that there should be a space before the last token
    * @param {ASTNode} node - The node to report in the event of an error.
    * @param {Token} token - The token to use for the report.
    * @returns {void}
    */
    function reportRequiredEndingSpace(node, token) {
        context.report({
            node: node,
            loc: token.loc.start,
            message: "A space is required before '" + token.value + "'",
            fix: function(fixer) {
                return fixer.insertTextBefore(token, " ");
            }
        });
    }

    /**
    * Determines if a node is an object type
    * @param {ASTNode} node - The node to check.
    * @returns {boolean} Whether or not the node is an object type.
    */
    function isObjectType(node) {
        return node && (node.type === "ObjectExpression" || node.type === "ObjectPattern");
    }

    /**
    * Determines if a node is an array type
    * @param {ASTNode} node - The node to check.
    * @returns {boolean} Whether or not the node is an array type.
    */
    function isArrayType(node) {
        return node && (node.type === "ArrayExpression" || node.type === "ArrayPattern");
    }

    /**
     * Validates the spacing around array brackets
     * @param {ASTNode} node - The node we're checking for spacing
     * @returns {void}
     */
    function validateArraySpacing(node) {
        if (options.spaced && node.elements.length === 0) {
            return;
        }

        var first = sourceCode.getFirstToken(node),
            second = sourceCode.getFirstToken(node, 1),
            penultimate = sourceCode.getLastToken(node, 1),
            last = sourceCode.getLastToken(node),
            firstElement = node.elements[0],
            lastElement = node.elements[node.elements.length - 1];

        var openingBracketMustBeSpaced =
            options.objectsInArraysException && isObjectType(firstElement) ||
            options.arraysInArraysException && isArrayType(firstElement) ||
            options.singleElementException && node.elements.length === 1
                ? !options.spaced : options.spaced;

        var closingBracketMustBeSpaced =
            options.objectsInArraysException && isObjectType(lastElement) ||
            options.arraysInArraysException && isArrayType(lastElement) ||
            options.singleElementException && node.elements.length === 1
                ? !options.spaced : options.spaced;

        if (astUtils.isTokenOnSameLine(first, second)) {
            if (openingBracketMustBeSpaced && !sourceCode.isSpaceBetweenTokens(first, second)) {
                reportRequiredBeginningSpace(node, first);
            }
            if (!openingBracketMustBeSpaced && sourceCode.isSpaceBetweenTokens(first, second)) {
                reportNoBeginningSpace(node, first);
            }
        }

        if (first !== penultimate && astUtils.isTokenOnSameLine(penultimate, last)) {
            if (closingBracketMustBeSpaced && !sourceCode.isSpaceBetweenTokens(penultimate, last)) {
                reportRequiredEndingSpace(node, last);
            }
            if (!closingBracketMustBeSpaced && sourceCode.isSpaceBetweenTokens(penultimate, last)) {
                reportNoEndingSpace(node, last);
            }
        }
    }

    //--------------------------------------------------------------------------
    // Public
    //--------------------------------------------------------------------------

    return {
        ArrayPattern: validateArraySpacing,
        ArrayExpression: validateArraySpacing
    };
}

};

},{“../ast-utils”:124}],141:[function(require,module,exports){ /**

* @fileoverview Rule to enforce return statements in callbacks of array's methods
* @author Toru Nagashima
*/

“use strict”;

//—————————————————————————— // Requirements //——————————————————————————

var astUtils = require(“../ast-utils”);

//—————————————————————————— // Helpers //——————————————————————————

var TARGET_NODE_TYPE = /^(?:Arrow)?FunctionExpression$/; var TARGET_METHODS = /^(?:every|filter|find(?:Index)?|map|reduce(?:Right)?|some|sort)$/;

/**

* Checks a given code path segment is reachable.
*
* @param {CodePathSegment} segment - A segment to check.
* @returns {boolean} `true` if the segment is reachable.
*/

function isReachable(segment) {

return segment.reachable;

}

/**

* Gets a readable location.
*
* - FunctionExpression -> the function name or `function` keyword.
* - ArrowFunctionExpression -> `=>` token.
*
* @param {ASTNode} node - A function node to get.
* @param {SourceCode} sourceCode - A source code to get tokens.
* @returns {ASTNode|Token} The node or the token of a location.
*/

function getLocation(node, sourceCode) {

if (node.type === "ArrowFunctionExpression") {
    return sourceCode.getTokenBefore(node.body);
}
return node.id || node;

}

/**

* Gets the name of a given node if the node is a Identifier node.
*
* @param {ASTNode} node - A node to get.
* @returns {string} The name of the node, or an empty string.
*/

function getIdentifierName(node) {

return node.type === "Identifier" ? node.name : "";

}

/**

* Gets the value of a given node if the node is a Literal node or a
* TemplateLiteral node.
*
* @param {ASTNode} node - A node to get.
* @returns {string} The value of the node, or an empty string.
*/

function getConstantStringValue(node) {

switch (node.type) {
    case "Literal":
        return String(node.value);

    case "TemplateLiteral":
        return node.expressions.length === 0
            ? node.quasis[0].value.cooked
            : "";

    default:
        return "";
}

}

/**

* Checks a given node is a MemberExpression node which has the specified name's
* property.
*
* @param {ASTNode} node - A node to check.
* @returns {boolean} `true` if the node is a MemberExpression node which has
*      the specified name's property
*/

function isTargetMethod(node) {

return (
    node.type === "MemberExpression" &&
    TARGET_METHODS.test(
        (node.computed ? getConstantStringValue : getIdentifierName)(node.property)
    )
);

}

/**

* Checks whether or not a given node is a function expression which is the
* callback of an array method.
*
* @param {ASTNode} node - A node to check. This is one of
*      FunctionExpression or ArrowFunctionExpression.
* @returns {boolean} `true` if the node is the callback of an array method.
*/

function isCallbackOfArrayMethod(node) {

while (node) {
    var parent = node.parent;

    switch (parent.type) {

        /*
         * Looks up the destination. e.g.,
         * foo.every(nativeFoo || function foo() { ... });
         */
        case "LogicalExpression":
        case "ConditionalExpression":
            node = parent;
            break;

        // If the upper function is IIFE, checks the destination of the return value.
        // e.g.
        //   foo.every((function() {
        //     // setup...
        //     return function callback() { ... };
        //   })());
        case "ReturnStatement":
            var func = astUtils.getUpperFunction(parent);

            if (func === null || !astUtils.isCallee(func)) {
                return false;
            }
            node = func.parent;
            break;

        // e.g.
        //   Array.from([], function() {});
        //   list.every(function() {});
        case "CallExpression":
            if (astUtils.isArrayFromMethod(parent.callee)) {
                return (
                    parent.arguments.length >= 2 &&
                    parent.arguments[1] === node
                );
            }
            if (isTargetMethod(parent.callee)) {
                return (
                    parent.arguments.length >= 1 &&
                    parent.arguments[0] === node
                );
            }
            return false;

        // Otherwise this node is not target.
        default:
            return false;
    }
}

/* istanbul ignore next: unreachable */
return false;

}

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "enforce `return` statements in callbacks of array methods",
        category: "Best Practices",
        recommended: false
    },

    schema: []
},

create: function(context) {
    var funcInfo = {
        upper: null,
        codePath: null,
        hasReturn: false,
        shouldCheck: false
    };

    /**
     * Checks whether or not the last code path segment is reachable.
     * Then reports this function if the segment is reachable.
     *
     * If the last code path segment is reachable, there are paths which are not
     * returned or thrown.
     *
     * @param {ASTNode} node - A node to check.
     * @returns {void}
     */
    function checkLastSegment(node) {
        if (funcInfo.shouldCheck &&
            funcInfo.codePath.currentSegments.some(isReachable)
        ) {
            context.report({
                node: node,
                loc: getLocation(node, context.getSourceCode()).loc.start,
                message: funcInfo.hasReturn
                    ? "Expected to return a value at the end of this function."
                    : "Expected to return a value in this function."
            });
        }
    }

    return {

        // Stacks this function's information.
        onCodePathStart: function(codePath, node) {
            funcInfo = {
                upper: funcInfo,
                codePath: codePath,
                hasReturn: false,
                shouldCheck:
                    TARGET_NODE_TYPE.test(node.type) &&
                    node.body.type === "BlockStatement" &&
                    isCallbackOfArrayMethod(node)
            };
        },

        // Pops this function's information.
        onCodePathEnd: function() {
            funcInfo = funcInfo.upper;
        },

        // Checks the return statement is valid.
        ReturnStatement: function(node) {
            if (funcInfo.shouldCheck) {
                funcInfo.hasReturn = true;

                if (!node.argument) {
                    context.report({
                        node: node,
                        message: "Expected a return value."
                    });
                }
            }
        },

        // Reports a given function if the last path is reachable.
        "FunctionExpression:exit": checkLastSegment,
        "ArrowFunctionExpression:exit": checkLastSegment
    };
}

};

},{“../ast-utils”:124}],142:[function(require,module,exports){ /**

* @fileoverview Rule to require braces in arrow function body.
* @author Alberto Rodríguez
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "require braces around arrow function bodies",
        category: "ECMAScript 6",
        recommended: false
    },

    schema: {
        anyOf: [
            {
                type: "array",
                items: [
                    {
                        enum: ["always", "never"]
                    }
                ],
                minItems: 0,
                maxItems: 1
            },
            {
                type: "array",
                items: [
                    {
                        enum: ["as-needed"]
                    },
                    {
                        type: "object",
                        properties: {
                            requireReturnForObjectLiteral: {type: "boolean"}
                        },
                        additionalProperties: false
                    }
                ],
                minItems: 0,
                maxItems: 2
            }
        ]
    }
},

create: function(context) {
    var options = context.options;
    var always = options[0] === "always";
    var asNeeded = !options[0] || options[0] === "as-needed";
    var never = options[0] === "never";
    var requireReturnForObjectLiteral = options[1] && options[1].requireReturnForObjectLiteral;

    /**
     * Determines whether a arrow function body needs braces
     * @param {ASTNode} node The arrow function node.
     * @returns {void}
     */
    function validate(node) {
        var arrowBody = node.body;

        if (arrowBody.type === "BlockStatement") {
            if (never) {
                context.report({
                    node: node,
                    loc: arrowBody.loc.start,
                    message: "Unexpected block statement surrounding arrow body."
                });
            } else {
                var blockBody = arrowBody.body;

                if (blockBody.length !== 1) {
                    return;
                }

                if (asNeeded && requireReturnForObjectLiteral && blockBody[0].type === "ReturnStatement" &&
                    blockBody[0].argument.type === "ObjectExpression") {
                    return;
                }

                if (asNeeded && blockBody[0].type === "ReturnStatement") {
                    context.report({
                        node: node,
                        loc: arrowBody.loc.start,
                        message: "Unexpected block statement surrounding arrow body."
                    });
                }
            }
        } else {
            if (always || (asNeeded && requireReturnForObjectLiteral && arrowBody.type === "ObjectExpression")) {
                context.report({
                    node: node,
                    loc: arrowBody.loc.start,
                    message: "Expected block statement surrounding arrow body."
                });
            }
        }
    }

    return {
        ArrowFunctionExpression: validate
    };
}

};

},{}],143:[function(require,module,exports){ /**

* @fileoverview Rule to require parens in arrow function arguments.
* @author Jxck
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "require parentheses around arrow function arguments",
        category: "ECMAScript 6",
        recommended: false
    },

    schema: [
        {
            enum: ["always", "as-needed"]
        }
    ]
},

create: function(context) {
    var message = "Expected parentheses around arrow function argument.";
    var asNeededMessage = "Unexpected parentheses around single function argument";
    var asNeeded = context.options[0] === "as-needed";

    var sourceCode = context.getSourceCode();

    /**
     * Determines whether a arrow function argument end with `)`
     * @param {ASTNode} node The arrow function node.
     * @returns {void}
     */
    function parens(node) {
        var token = sourceCode.getFirstToken(node);

        // as-needed: x => x
        if (asNeeded && node.params.length === 1 && node.params[0].type === "Identifier") {
            if (token.type === "Punctuator" && token.value === "(") {
                context.report(node, asNeededMessage);
            }
            return;
        }

        if (token.type === "Identifier") {
            var after = sourceCode.getTokenAfter(token);

            // (x) => x
            if (after.value !== ")") {
                context.report(node, message);
            }
        }
    }

    return {
        ArrowFunctionExpression: parens
    };
}

};

},{}],144:[function(require,module,exports){ /**

* @fileoverview Rule to define spacing before/after arrow function's arrow.
* @author Jxck
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "enforce consistent spacing before and after the arrow in arrow functions",
        category: "ECMAScript 6",
        recommended: false
    },

    fixable: "whitespace",

    schema: [
        {
            type: "object",
            properties: {
                before: {
                    type: "boolean"
                },
                after: {
                    type: "boolean"
                }
            },
            additionalProperties: false
        }
    ]
},

create: function(context) {

    // merge rules with default
    var rule = { before: true, after: true },
        option = context.options[0] || {};

    rule.before = option.before !== false;
    rule.after = option.after !== false;

    var sourceCode = context.getSourceCode();

    /**
     * Get tokens of arrow(`=>`) and before/after arrow.
     * @param {ASTNode} node The arrow function node.
     * @returns {Object} Tokens of arrow and before/after arrow.
     */
    function getTokens(node) {
        var t = sourceCode.getFirstToken(node);
        var before;

        while (t.type !== "Punctuator" || t.value !== "=>") {
            before = t;
            t = sourceCode.getTokenAfter(t);
        }
        var after = sourceCode.getTokenAfter(t);

        return { before: before, arrow: t, after: after };
    }

    /**
     * Count spaces before/after arrow(`=>`) token.
     * @param {Object} tokens Tokens before/after arrow.
     * @returns {Object} count of space before/after arrow.
     */
    function countSpaces(tokens) {
        var before = tokens.arrow.range[0] - tokens.before.range[1];
        var after = tokens.after.range[0] - tokens.arrow.range[1];

        return { before: before, after: after };
    }

    /**
     * Determines whether space(s) before after arrow(`=>`) is satisfy rule.
     * if before/after value is `true`, there should be space(s).
     * if before/after value is `false`, there should be no space.
     * @param {ASTNode} node The arrow function node.
     * @returns {void}
     */
    function spaces(node) {
        var tokens = getTokens(node);
        var countSpace = countSpaces(tokens);

        if (rule.before) {

            // should be space(s) before arrow
            if (countSpace.before === 0) {
                context.report({
                    node: tokens.before,
                    message: "Missing space before =>",
                    fix: function(fixer) {
                        return fixer.insertTextBefore(tokens.arrow, " ");
                    }
                });
            }
        } else {

            // should be no space before arrow
            if (countSpace.before > 0) {
                context.report({
                    node: tokens.before,
                    message: "Unexpected space before =>",
                    fix: function(fixer) {
                        return fixer.removeRange([tokens.before.range[1], tokens.arrow.range[0]]);
                    }
                });
            }
        }

        if (rule.after) {

            // should be space(s) after arrow
            if (countSpace.after === 0) {
                context.report({
                    node: tokens.after,
                    message: "Missing space after =>",
                    fix: function(fixer) {
                        return fixer.insertTextAfter(tokens.arrow, " ");
                    }
                });
            }
        } else {

            // should be no space after arrow
            if (countSpace.after > 0) {
                context.report({
                    node: tokens.after,
                    message: "Unexpected space after =>",
                    fix: function(fixer) {
                        return fixer.removeRange([tokens.arrow.range[1], tokens.after.range[0]]);
                    }
                });
            }
        }
    }

    return {
        ArrowFunctionExpression: spaces
    };
}

};

},{}],145:[function(require,module,exports){ /**

* @fileoverview Rule to check for "block scoped" variables by binding context
* @author Matt DuVall <http://www.mattduvall.com>
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "enforce the use of variables within the scope they are defined",
        category: "Best Practices",
        recommended: false
    },

    schema: []
},

create: function(context) {
    var stack = [];

    /**
     * Makes a block scope.
     * @param {ASTNode} node - A node of a scope.
     * @returns {void}
     */
    function enterScope(node) {
        stack.push(node.range);
    }

    /**
     * Pops the last block scope.
     * @returns {void}
     */
    function exitScope() {
        stack.pop();
    }

    /**
     * Reports a given reference.
     * @param {escope.Reference} reference - A reference to report.
     * @returns {void}
     */
    function report(reference) {
        var identifier = reference.identifier;

        context.report(
            identifier,
            "'{{name}}' used outside of binding context.",
            {name: identifier.name});
    }

    /**
     * Finds and reports references which are outside of valid scopes.
     * @param {ASTNode} node - A node to get variables.
     * @returns {void}
     */
    function checkForVariables(node) {
        if (node.kind !== "var") {
            return;
        }

        // Defines a predicate to check whether or not a given reference is outside of valid scope.
        var scopeRange = stack[stack.length - 1];

        /**
         * Check if a reference is out of scope
         * @param {ASTNode} reference node to examine
         * @returns {boolean} True is its outside the scope
         * @private
         */
        function isOutsideOfScope(reference) {
            var idRange = reference.identifier.range;

            return idRange[0] < scopeRange[0] || idRange[1] > scopeRange[1];
        }

        // Gets declared variables, and checks its references.
        var variables = context.getDeclaredVariables(node);

        for (var i = 0; i < variables.length; ++i) {

            // Reports.
            variables[i]
                .references
                .filter(isOutsideOfScope)
                .forEach(report);
        }
    }

    return {
        Program: function(node) {
            stack = [node.range];
        },

        // Manages scopes.
        BlockStatement: enterScope,
        "BlockStatement:exit": exitScope,
        ForStatement: enterScope,
        "ForStatement:exit": exitScope,
        ForInStatement: enterScope,
        "ForInStatement:exit": exitScope,
        ForOfStatement: enterScope,
        "ForOfStatement:exit": exitScope,
        SwitchStatement: enterScope,
        "SwitchStatement:exit": exitScope,
        CatchClause: enterScope,
        "CatchClause:exit": exitScope,

        // Finds and reports references which are outside of valid scope.
        VariableDeclaration: checkForVariables
    };

}

};

},{}],146:[function(require,module,exports){ /**

* @fileoverview A rule to disallow or enforce spaces inside of single line blocks.
* @author Toru Nagashima
*/

“use strict”;

var util = require(“../ast-utils”);

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "enforce consistent spacing inside single-line blocks",
        category: "Stylistic Issues",
        recommended: false
    },

    fixable: "whitespace",

    schema: [
        {enum: ["always", "never"]}
    ]
},

create: function(context) {
    var always = (context.options[0] !== "never"),
        message = always ? "Requires a space" : "Unexpected space(s)",
        sourceCode = context.getSourceCode();

    /**
     * Gets the open brace token from a given node.
     * @param {ASTNode} node - A BlockStatement/SwitchStatement node to get.
     * @returns {Token} The token of the open brace.
     */
    function getOpenBrace(node) {
        if (node.type === "SwitchStatement") {
            if (node.cases.length > 0) {
                return sourceCode.getTokenBefore(node.cases[0]);
            }
            return sourceCode.getLastToken(node, 1);
        }
        return sourceCode.getFirstToken(node);
    }

    /**
     * Checks whether or not:
     *   - given tokens are on same line.
     *   - there is/isn't a space between given tokens.
     * @param {Token} left - A token to check.
     * @param {Token} right - The token which is next to `left`.
     * @returns {boolean}
     *    When the option is `"always"`, `true` if there are one or more spaces between given tokens.
     *    When the option is `"never"`, `true` if there are not any spaces between given tokens.
     *    If given tokens are not on same line, it's always `true`.
     */
    function isValid(left, right) {
        return (
            !util.isTokenOnSameLine(left, right) ||
            sourceCode.isSpaceBetweenTokens(left, right) === always
        );
    }

    /**
     * Reports invalid spacing style inside braces.
     * @param {ASTNode} node - A BlockStatement/SwitchStatement node to get.
     * @returns {void}
     */
    function checkSpacingInsideBraces(node) {

        // Gets braces and the first/last token of content.
        var openBrace = getOpenBrace(node);
        var closeBrace = sourceCode.getLastToken(node);
        var firstToken = sourceCode.getTokenOrCommentAfter(openBrace);
        var lastToken = sourceCode.getTokenOrCommentBefore(closeBrace);

        // Skip if the node is invalid or empty.
        if (openBrace.type !== "Punctuator" ||
            openBrace.value !== "{" ||
            closeBrace.type !== "Punctuator" ||
            closeBrace.value !== "}" ||
            firstToken === closeBrace
        ) {
            return;
        }

        // Skip line comments for option never
        if (!always && firstToken.type === "Line") {
            return;
        }

        // Check.
        if (!isValid(openBrace, firstToken)) {
            context.report({
                node: node,
                loc: openBrace.loc.start,
                message: message + " after '{'.",
                fix: function(fixer) {
                    if (always) {
                        return fixer.insertTextBefore(firstToken, " ");
                    }

                    return fixer.removeRange([openBrace.range[1], firstToken.range[0]]);
                }
            });
        }
        if (!isValid(lastToken, closeBrace)) {
            context.report({
                node: node,
                loc: closeBrace.loc.start,
                message: message + " before '}'.",
                fix: function(fixer) {
                    if (always) {
                        return fixer.insertTextAfter(lastToken, " ");
                    }

                    return fixer.removeRange([lastToken.range[1], closeBrace.range[0]]);
                }
            });
        }
    }

    return {
        BlockStatement: checkSpacingInsideBraces,
        SwitchStatement: checkSpacingInsideBraces
    };
}

};

},{“../ast-utils”:124}],147:[function(require,module,exports){ /**

* @fileoverview Rule to flag block statements that do not use the one true brace style
* @author Ian Christian Myers
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "enforce consistent brace style for blocks",
        category: "Stylistic Issues",
        recommended: false
    },

    schema: [
        {
            enum: ["1tbs", "stroustrup", "allman"]
        },
        {
            type: "object",
            properties: {
                allowSingleLine: {
                    type: "boolean"
                }
            },
            additionalProperties: false
        }
    ]
},

create: function(context) {
    var style = context.options[0] || "1tbs",
        params = context.options[1] || {},
        sourceCode = context.getSourceCode();

    var OPEN_MESSAGE = "Opening curly brace does not appear on the same line as controlling statement.",
        OPEN_MESSAGE_ALLMAN = "Opening curly brace appears on the same line as controlling statement.",
        BODY_MESSAGE = "Statement inside of curly braces should be on next line.",
        CLOSE_MESSAGE = "Closing curly brace does not appear on the same line as the subsequent block.",
        CLOSE_MESSAGE_SINGLE = "Closing curly brace should be on the same line as opening curly brace or on the line after the previous block.",
        CLOSE_MESSAGE_STROUSTRUP_ALLMAN = "Closing curly brace appears on the same line as the subsequent block.";

    //--------------------------------------------------------------------------
    // Helpers
    //--------------------------------------------------------------------------

    /**
     * Determines if a given node is a block statement.
     * @param {ASTNode} node The node to check.
     * @returns {boolean} True if the node is a block statement, false if not.
     * @private
     */
    function isBlock(node) {
        return node && node.type === "BlockStatement";
    }

    /**
     * Check if the token is an punctuator with a value of curly brace
     * @param {object} token - Token to check
     * @returns {boolean} true if its a curly punctuator
     * @private
     */
    function isCurlyPunctuator(token) {
        return token.value === "{" || token.value === "}";
    }

    /**
     * Binds a list of properties to a function that verifies that the opening
     * curly brace is on the same line as its controlling statement of a given
     * node.
     * @param {...string} The properties to check on the node.
     * @returns {Function} A function that will perform the check on a node
     * @private
     */
    function checkBlock() {
        var blockProperties = arguments;

        return function(node) {
            Array.prototype.forEach.call(blockProperties, function(blockProp) {
                var block = node[blockProp],
                    previousToken,
                    curlyToken,
                    curlyTokenEnd,
                    allOnSameLine;

                if (!isBlock(block)) {
                    return;
                }

                previousToken = sourceCode.getTokenBefore(block);
                curlyToken = sourceCode.getFirstToken(block);
                curlyTokenEnd = sourceCode.getLastToken(block);
                allOnSameLine = previousToken.loc.start.line === curlyTokenEnd.loc.start.line;

                if (allOnSameLine && params.allowSingleLine) {
                    return;
                }

                if (style !== "allman" && previousToken.loc.start.line !== curlyToken.loc.start.line) {
                    context.report(node, OPEN_MESSAGE);
                } else if (style === "allman" && previousToken.loc.start.line === curlyToken.loc.start.line) {
                    context.report(node, OPEN_MESSAGE_ALLMAN);
                }

                if (!block.body.length) {
                    return;
                }

                if (curlyToken.loc.start.line === block.body[0].loc.start.line) {
                    context.report(block.body[0], BODY_MESSAGE);
                }

                if (curlyTokenEnd.loc.start.line === block.body[block.body.length - 1].loc.start.line) {
                    context.report(block.body[block.body.length - 1], CLOSE_MESSAGE_SINGLE);
                }
            });
        };
    }

    /**
     * Enforces the configured brace style on IfStatements
     * @param {ASTNode} node An IfStatement node.
     * @returns {void}
     * @private
     */
    function checkIfStatement(node) {
        var tokens;

        checkBlock("consequent", "alternate")(node);

        if (node.alternate) {

            tokens = sourceCode.getTokensBefore(node.alternate, 2);

            if (style === "1tbs") {
                if (tokens[0].loc.start.line !== tokens[1].loc.start.line &&
                    node.consequent.type === "BlockStatement" &&
                    isCurlyPunctuator(tokens[0])) {
                    context.report(node.alternate, CLOSE_MESSAGE);
                }
            } else if (tokens[0].loc.start.line === tokens[1].loc.start.line) {
                context.report(node.alternate, CLOSE_MESSAGE_STROUSTRUP_ALLMAN);
            }

        }
    }

    /**
     * Enforces the configured brace style on TryStatements
     * @param {ASTNode} node A TryStatement node.
     * @returns {void}
     * @private
     */
    function checkTryStatement(node) {
        var tokens;

        checkBlock("block", "finalizer")(node);

        if (isBlock(node.finalizer)) {
            tokens = sourceCode.getTokensBefore(node.finalizer, 2);
            if (style === "1tbs") {
                if (tokens[0].loc.start.line !== tokens[1].loc.start.line) {
                    context.report(node.finalizer, CLOSE_MESSAGE);
                }
            } else if (tokens[0].loc.start.line === tokens[1].loc.start.line) {
                context.report(node.finalizer, CLOSE_MESSAGE_STROUSTRUP_ALLMAN);
            }
        }
    }

    /**
     * Enforces the configured brace style on CatchClauses
     * @param {ASTNode} node A CatchClause node.
     * @returns {void}
     * @private
     */
    function checkCatchClause(node) {
        var previousToken = sourceCode.getTokenBefore(node),
            firstToken = sourceCode.getFirstToken(node);

        checkBlock("body")(node);

        if (isBlock(node.body)) {
            if (style === "1tbs") {
                if (previousToken.loc.start.line !== firstToken.loc.start.line) {
                    context.report(node, CLOSE_MESSAGE);
                }
            } else {
                if (previousToken.loc.start.line === firstToken.loc.start.line) {
                    context.report(node, CLOSE_MESSAGE_STROUSTRUP_ALLMAN);
                }
            }
        }
    }

    /**
     * Enforces the configured brace style on SwitchStatements
     * @param {ASTNode} node A SwitchStatement node.
     * @returns {void}
     * @private
     */
    function checkSwitchStatement(node) {
        var tokens;

        if (node.cases && node.cases.length) {
            tokens = sourceCode.getTokensBefore(node.cases[0], 2);
        } else {
            tokens = sourceCode.getLastTokens(node, 3);
        }

        if (style !== "allman" && tokens[0].loc.start.line !== tokens[1].loc.start.line) {
            context.report(node, OPEN_MESSAGE);
        } else if (style === "allman" && tokens[0].loc.start.line === tokens[1].loc.start.line) {
            context.report(node, OPEN_MESSAGE_ALLMAN);
        }
    }

    //--------------------------------------------------------------------------
    // Public API
    //--------------------------------------------------------------------------

    return {
        FunctionDeclaration: checkBlock("body"),
        FunctionExpression: checkBlock("body"),
        ArrowFunctionExpression: checkBlock("body"),
        IfStatement: checkIfStatement,
        TryStatement: checkTryStatement,
        CatchClause: checkCatchClause,
        DoWhileStatement: checkBlock("body"),
        WhileStatement: checkBlock("body"),
        WithStatement: checkBlock("body"),
        ForStatement: checkBlock("body"),
        ForInStatement: checkBlock("body"),
        ForOfStatement: checkBlock("body"),
        SwitchStatement: checkSwitchStatement
    };

}

};

},{}],148:[function(require,module,exports){ /**

* @fileoverview Enforce return after a callback.
* @author Jamund Ferguson
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "require `return` statements after callbacks",
        category: "Node.js and CommonJS",
        recommended: false
    },

    schema: [{
        type: "array",
        items: { type: "string" }
    }]
},

create: function(context) {

    var callbacks = context.options[0] || ["callback", "cb", "next"],
        sourceCode = context.getSourceCode();

    //--------------------------------------------------------------------------
    // Helpers
    //--------------------------------------------------------------------------

    /**
     * Find the closest parent matching a list of types.
     * @param {ASTNode} node The node whose parents we are searching
     * @param {Array} types The node types to match
     * @returns {ASTNode} The matched node or undefined.
     */
    function findClosestParentOfType(node, types) {
        if (!node.parent) {
            return null;
        }
        if (types.indexOf(node.parent.type) === -1) {
            return findClosestParentOfType(node.parent, types);
        }
        return node.parent;
    }

    /**
     * Check to see if a node contains only identifers
     * @param {ASTNode} node The node to check
     * @returns {Boolean} Whether or not the node contains only identifers
     */
    function containsOnlyIdentifiers(node) {
        if (node.type === "Identifier") {
            return true;
        }

        if (node.type === "MemberExpression") {
            if (node.object.type === "Identifier") {
                return true;
            } else if (node.object.type === "MemberExpression") {
                return containsOnlyIdentifiers(node.object);
            }
        }

        return false;
    }

    /**
     * Check to see if a CallExpression is in our callback list.
     * @param {ASTNode} node The node to check against our callback names list.
     * @returns {Boolean} Whether or not this function matches our callback name.
     */
    function isCallback(node) {
        return containsOnlyIdentifiers(node.callee) && callbacks.indexOf(sourceCode.getText(node.callee)) > -1;
    }

    /**
     * Determines whether or not the callback is part of a callback expression.
     * @param {ASTNode} node The callback node
     * @param {ASTNode} parentNode The expression node
     * @returns {boolean} Whether or not this is part of a callback expression
     */
    function isCallbackExpression(node, parentNode) {

        // ensure the parent node exists and is an expression
        if (!parentNode || parentNode.type !== "ExpressionStatement") {
            return false;
        }

        // cb()
        if (parentNode.expression === node) {
            return true;
        }

        // special case for cb && cb() and similar
        if (parentNode.expression.type === "BinaryExpression" || parentNode.expression.type === "LogicalExpression") {
            if (parentNode.expression.right === node) {
                return true;
            }
        }

        return false;
    }

    //--------------------------------------------------------------------------
    // Public
    //--------------------------------------------------------------------------

    return {
        CallExpression: function(node) {

            // if we're not a callback we can return
            if (!isCallback(node)) {
                return;
            }

            // find the closest block, return or loop
            var closestBlock = findClosestParentOfType(node, ["BlockStatement", "ReturnStatement", "ArrowFunctionExpression"]) || {},
                lastItem, parentType;

            // if our parent is a return we know we're ok
            if (closestBlock.type === "ReturnStatement") {
                return;
            }

            // arrow functions don't always have blocks and implicitly return
            if (closestBlock.type === "ArrowFunctionExpression") {
                return;
            }

            // block statements are part of functions and most if statements
            if (closestBlock.type === "BlockStatement") {

                // find the last item in the block
                lastItem = closestBlock.body[closestBlock.body.length - 1];

                // if the callback is the last thing in a block that might be ok
                if (isCallbackExpression(node, lastItem)) {

                    parentType = closestBlock.parent.type;

                    // but only if the block is part of a function
                    if (parentType === "FunctionExpression" ||
                        parentType === "FunctionDeclaration" ||
                        parentType === "ArrowFunctionExpression"
                    ) {
                        return;
                    }

                }

                // ending a block with a return is also ok
                if (lastItem.type === "ReturnStatement") {

                    // but only if the callback is immediately before
                    if (isCallbackExpression(node, closestBlock.body[closestBlock.body.length - 2])) {
                        return;
                    }
                }

            }

            // as long as you're the child of a function at this point you should be asked to return
            if (findClosestParentOfType(node, ["FunctionDeclaration", "FunctionExpression", "ArrowFunctionExpression"])) {
                context.report(node, "Expected return with your callback function.");
            }

        }

    };
}

};

},{}],149:[function(require,module,exports){ /**

* @fileoverview Rule to flag non-camelcased identifiers
* @author Nicholas C. Zakas
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "enforce camelcase naming convention",
        category: "Stylistic Issues",
        recommended: false
    },

    schema: [
        {
            type: "object",
            properties: {
                properties: {
                    enum: ["always", "never"]
                }
            },
            additionalProperties: false
        }
    ]
},

create: function(context) {

    //--------------------------------------------------------------------------
    // Helpers
    //--------------------------------------------------------------------------

    // contains reported nodes to avoid reporting twice on destructuring with shorthand notation
    var reported = [];

    /**
     * Checks if a string contains an underscore and isn't all upper-case
     * @param {String} name The string to check.
     * @returns {boolean} if the string is underscored
     * @private
     */
    function isUnderscored(name) {

        // if there's an underscore, it might be A_CONSTANT, which is okay
        return name.indexOf("_") > -1 && name !== name.toUpperCase();
    }

    /**
     * Reports an AST node as a rule violation.
     * @param {ASTNode} node The node to report.
     * @returns {void}
     * @private
     */
    function report(node) {
        if (reported.indexOf(node) < 0) {
            reported.push(node);
            context.report(node, "Identifier '{{name}}' is not in camel case.", { name: node.name });
        }
    }

    var options = context.options[0] || {},
        properties = options.properties || "";

    if (properties !== "always" && properties !== "never") {
        properties = "always";
    }

    return {

        Identifier: function(node) {

            /*
             * Leading and trailing underscores are commonly used to flag
             * private/protected identifiers, strip them
             */
            var name = node.name.replace(/^_+|_+$/g, ""),
                effectiveParent = (node.parent.type === "MemberExpression") ? node.parent.parent : node.parent;

            // MemberExpressions get special rules
            if (node.parent.type === "MemberExpression") {

                // "never" check properties
                if (properties === "never") {
                    return;
                }

                // Always report underscored object names
                if (node.parent.object.type === "Identifier" &&
                        node.parent.object.name === node.name &&
                        isUnderscored(name)) {
                    report(node);

                // Report AssignmentExpressions only if they are the left side of the assignment
                } else if (effectiveParent.type === "AssignmentExpression" &&
                        isUnderscored(name) &&
                        (effectiveParent.right.type !== "MemberExpression" ||
                        effectiveParent.left.type === "MemberExpression" &&
                        effectiveParent.left.property.name === node.name)) {
                    report(node);
                }

            // Properties have their own rules
            } else if (node.parent.type === "Property") {

                // "never" check properties
                if (properties === "never") {
                    return;
                }

                if (node.parent.parent && node.parent.parent.type === "ObjectPattern" &&
                        node.parent.key === node && node.parent.value !== node) {
                    return;
                }

                if (isUnderscored(name) && effectiveParent.type !== "CallExpression") {
                    report(node);
                }

            // Report anything that is underscored that isn't a CallExpression
            } else if (isUnderscored(name) && effectiveParent.type !== "CallExpression") {
                report(node);
            }
        }

    };

}

};

},{}],150:[function(require,module,exports){ /**

* @fileoverview Rule to forbid or enforce dangling commas.
* @author Ian Christian Myers
*/

“use strict”;

//—————————————————————————— // Requirements //——————————————————————————

var lodash = require(“lodash”);

/**

* Checks whether or not a trailing comma is allowed in a given node.
* `ArrayPattern` which has `RestElement` disallows it.
*
* @param {ASTNode} node - A node to check.
* @param {ASTNode} lastItem - The node of the last element in the given node.
* @returns {boolean} `true` if a trailing comma is allowed.
*/

function isTrailingCommaAllowed(node, lastItem) {

return node.type !== "ArrayPattern" || lastItem.type !== "RestElement";

}

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "require or disallow trailing commas",
        category: "Possible Errors",
        recommended: true
    },

    fixable: "code",

    schema: [
        {
            enum: ["always", "always-multiline", "only-multiline", "never"]
        }
    ]
},

create: function(context) {
    var mode = context.options[0];
    var UNEXPECTED_MESSAGE = "Unexpected trailing comma.";
    var MISSING_MESSAGE = "Missing trailing comma.";

    /**
     * Checks whether or not a given node is multiline.
     * This rule handles a given node as multiline when the closing parenthesis
     * and the last element are not on the same line.
     *
     * @param {ASTNode} node - A node to check.
     * @returns {boolean} `true` if the node is multiline.
     */
    function isMultiline(node) {
        var lastItem = lodash.last(node.properties || node.elements || node.specifiers);

        if (!lastItem) {
            return false;
        }

        var sourceCode = context.getSourceCode(),
            penultimateToken = sourceCode.getLastToken(lastItem),
            lastToken = sourceCode.getTokenAfter(penultimateToken);

        // parentheses are a pain
        while (lastToken.value === ")") {
            penultimateToken = lastToken;
            lastToken = sourceCode.getTokenAfter(lastToken);
        }

        if (lastToken.value === ",") {
            penultimateToken = lastToken;
            lastToken = sourceCode.getTokenAfter(lastToken);
        }

        return lastToken.loc.end.line !== penultimateToken.loc.end.line;
    }

    /**
     * Reports a trailing comma if it exists.
     *
     * @param {ASTNode} node - A node to check. Its type is one of
     *   ObjectExpression, ObjectPattern, ArrayExpression, ArrayPattern,
     *   ImportDeclaration, and ExportNamedDeclaration.
     * @returns {void}
     */
    function forbidTrailingComma(node) {
        var lastItem = lodash.last(node.properties || node.elements || node.specifiers);

        if (!lastItem || (node.type === "ImportDeclaration" && lastItem.type !== "ImportSpecifier")) {
            return;
        }

        var sourceCode = context.getSourceCode(),
            trailingToken;

        // last item can be surrounded by parentheses for object and array literals
        if (node.type === "ObjectExpression" || node.type === "ArrayExpression") {
            trailingToken = sourceCode.getTokenBefore(sourceCode.getLastToken(node));
        } else {
            trailingToken = sourceCode.getTokenAfter(lastItem);
        }

        if (trailingToken.value === ",") {
            context.report({
                node: lastItem,
                loc: trailingToken.loc.start,
                message: UNEXPECTED_MESSAGE,
                fix: function(fixer) {
                    return fixer.remove(trailingToken);
                }
            });
        }
    }

    /**
     * Reports the last element of a given node if it does not have a trailing
     * comma.
     *
     * If a given node is `ArrayPattern` which has `RestElement`, the trailing
     * comma is disallowed, so report if it exists.
     *
     * @param {ASTNode} node - A node to check. Its type is one of
     *   ObjectExpression, ObjectPattern, ArrayExpression, ArrayPattern,
     *   ImportDeclaration, and ExportNamedDeclaration.
     * @returns {void}
     */
    function forceTrailingComma(node) {
        var lastItem = lodash.last(node.properties || node.elements || node.specifiers);

        if (!lastItem || (node.type === "ImportDeclaration" && lastItem.type !== "ImportSpecifier")) {
            return;
        }
        if (!isTrailingCommaAllowed(node, lastItem)) {
            forbidTrailingComma(node);
            return;
        }

        var sourceCode = context.getSourceCode(),
            penultimateToken = lastItem,
            trailingToken = sourceCode.getTokenAfter(lastItem);

        // Skip close parentheses.
        while (trailingToken.value === ")") {
            penultimateToken = trailingToken;
            trailingToken = sourceCode.getTokenAfter(trailingToken);
        }

        if (trailingToken.value !== ",") {
            context.report({
                node: lastItem,
                loc: lastItem.loc.end,
                message: MISSING_MESSAGE,
                fix: function(fixer) {
                    return fixer.insertTextAfter(penultimateToken, ",");
                }
            });
        }
    }

    /**
     * If a given node is multiline, reports the last element of a given node
     * when it does not have a trailing comma.
     * Otherwise, reports a trailing comma if it exists.
     *
     * @param {ASTNode} node - A node to check. Its type is one of
     *   ObjectExpression, ObjectPattern, ArrayExpression, ArrayPattern,
     *   ImportDeclaration, and ExportNamedDeclaration.
     * @returns {void}
     */
    function forceTrailingCommaIfMultiline(node) {
        if (isMultiline(node)) {
            forceTrailingComma(node);
        } else {
            forbidTrailingComma(node);
        }
    }

    /**
     * Only if a given node is not multiline, reports the last element of a given node
     * when it does not have a trailing comma.
     * Otherwise, reports a trailing comma if it exists.
     *
     * @param {ASTNode} node - A node to check. Its type is one of
     *   ObjectExpression, ObjectPattern, ArrayExpression, ArrayPattern,
     *   ImportDeclaration, and ExportNamedDeclaration.
     * @returns {void}
     */
    function allowTrailingCommaIfMultiline(node) {
        if (!isMultiline(node)) {
            forbidTrailingComma(node);
        }
    }

    // Chooses a checking function.
    var checkForTrailingComma;

    if (mode === "always") {
        checkForTrailingComma = forceTrailingComma;
    } else if (mode === "always-multiline") {
        checkForTrailingComma = forceTrailingCommaIfMultiline;
    } else if (mode === "only-multiline") {
        checkForTrailingComma = allowTrailingCommaIfMultiline;
    } else {
        checkForTrailingComma = forbidTrailingComma;
    }

    return {
        ObjectExpression: checkForTrailingComma,
        ObjectPattern: checkForTrailingComma,
        ArrayExpression: checkForTrailingComma,
        ArrayPattern: checkForTrailingComma,
        ImportDeclaration: checkForTrailingComma,
        ExportNamedDeclaration: checkForTrailingComma
    };
}

};

},{“lodash”:108}],151:[function(require,module,exports){ /**

* @fileoverview Comma spacing - validates spacing before and after comma
* @author Vignesh Anand aka vegetableman.
*/

“use strict”;

var astUtils = require(“../ast-utils”);

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "enforce consistent spacing before and after commas",
        category: "Stylistic Issues",
        recommended: false
    },

    fixable: "whitespace",

    schema: [
        {
            type: "object",
            properties: {
                before: {
                    type: "boolean"
                },
                after: {
                    type: "boolean"
                }
            },
            additionalProperties: false
        }
    ]
},

create: function(context) {

    var sourceCode = context.getSourceCode();
    var tokensAndComments = sourceCode.tokensAndComments;

    var options = {
        before: context.options[0] ? !!context.options[0].before : false,
        after: context.options[0] ? !!context.options[0].after : true
    };

    //--------------------------------------------------------------------------
    // Helpers
    //--------------------------------------------------------------------------

    // list of comma tokens to ignore for the check of leading whitespace
    var commaTokensToIgnore = [];

    /**
     * Determines if a given token is a comma operator.
     * @param {ASTNode} token The token to check.
     * @returns {boolean} True if the token is a comma, false if not.
     * @private
     */
    function isComma(token) {
        return !!token && (token.type === "Punctuator") && (token.value === ",");
    }

    /**
     * Reports a spacing error with an appropriate message.
     * @param {ASTNode} node The binary expression node to report.
     * @param {string} dir Is the error "before" or "after" the comma?
     * @param {ASTNode} otherNode The node at the left or right of `node`
     * @returns {void}
     * @private
     */
    function report(node, dir, otherNode) {
        context.report({
            node: node,
            fix: function(fixer) {
                if (options[dir]) {
                    if (dir === "before") {
                        return fixer.insertTextBefore(node, " ");
                    } else {
                        return fixer.insertTextAfter(node, " ");
                    }
                } else {
                    var start, end;
                    var newText = "";

                    if (dir === "before") {
                        start = otherNode.range[1];
                        end = node.range[0];
                    } else {
                        start = node.range[1];
                        end = otherNode.range[0];
                    }

                    return fixer.replaceTextRange([start, end], newText);
                }
            },
            message: options[dir] ?
              "A space is required " + dir + " ','." :
              "There should be no space " + dir + " ','."
        });
    }

    /**
     * Validates the spacing around a comma token.
     * @param {Object} tokens - The tokens to be validated.
     * @param {Token} tokens.comma The token representing the comma.
     * @param {Token} [tokens.left] The last token before the comma.
     * @param {Token} [tokens.right] The first token after the comma.
     * @param {Token|ASTNode} reportItem The item to use when reporting an error.
     * @returns {void}
     * @private
     */
    function validateCommaItemSpacing(tokens, reportItem) {
        if (tokens.left && astUtils.isTokenOnSameLine(tokens.left, tokens.comma) &&
                (options.before !== sourceCode.isSpaceBetweenTokens(tokens.left, tokens.comma))
        ) {
            report(reportItem, "before", tokens.left);
        }

        if (tokens.right && !options.after && tokens.right.type === "Line") {
            return;
        }

        if (tokens.right && astUtils.isTokenOnSameLine(tokens.comma, tokens.right) &&
                (options.after !== sourceCode.isSpaceBetweenTokens(tokens.comma, tokens.right))
        ) {
            report(reportItem, "after", tokens.right);
        }
    }

    /**
     * Adds null elements of the given ArrayExpression or ArrayPattern node to the ignore list.
     * @param {ASTNode} node An ArrayExpression or ArrayPattern node.
     * @returns {void}
     */
    function addNullElementsToIgnoreList(node) {
        var previousToken = sourceCode.getFirstToken(node);

        node.elements.forEach(function(element) {
            var token;

            if (element === null) {
                token = sourceCode.getTokenAfter(previousToken);

                if (isComma(token)) {
                    commaTokensToIgnore.push(token);
                }
            } else {
                token = sourceCode.getTokenAfter(element);
            }

            previousToken = token;
        });
    }

    //--------------------------------------------------------------------------
    // Public
    //--------------------------------------------------------------------------

    return {
        "Program:exit": function() {

            var previousToken,
                nextToken;

            tokensAndComments.forEach(function(token, i) {

                if (!isComma(token)) {
                    return;
                }

                if (token && token.type === "JSXText") {
                    return;
                }

                previousToken = tokensAndComments[i - 1];
                nextToken = tokensAndComments[i + 1];

                validateCommaItemSpacing({
                    comma: token,
                    left: isComma(previousToken) || commaTokensToIgnore.indexOf(token) > -1 ? null : previousToken,
                    right: isComma(nextToken) ? null : nextToken
                }, token);
            });
        },
        ArrayExpression: addNullElementsToIgnoreList,
        ArrayPattern: addNullElementsToIgnoreList

    };

}

};

},{“../ast-utils”:124}],152:[function(require,module,exports){ /**

* @fileoverview Comma style - enforces comma styles of two types: last and first
* @author Vignesh Anand aka vegetableman
*/

“use strict”;

var astUtils = require(“../ast-utils”);

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "enforce consistent comma style",
        category: "Stylistic Issues",
        recommended: false
    },

    schema: [
        {
            enum: ["first", "last"]
        },
        {
            type: "object",
            properties: {
                exceptions: {
                    type: "object",
                    additionalProperties: {
                        type: "boolean"
                    }
                }
            },
            additionalProperties: false
        }
    ]
},

create: function(context) {
    var style = context.options[0] || "last",
        exceptions = {},
        sourceCode = context.getSourceCode();

    if (context.options.length === 2 && context.options[1].hasOwnProperty("exceptions")) {
        exceptions = context.options[1].exceptions;
    }

    //--------------------------------------------------------------------------
    // Helpers
    //--------------------------------------------------------------------------

    /**
     * Determines if a given token is a comma operator.
     * @param {ASTNode} token The token to check.
     * @returns {boolean} True if the token is a comma, false if not.
     * @private
     */
    function isComma(token) {
        return !!token && (token.type === "Punctuator") && (token.value === ",");
    }

    /**
     * Validates the spacing around single items in lists.
     * @param {Token} previousItemToken The last token from the previous item.
     * @param {Token} commaToken The token representing the comma.
     * @param {Token} currentItemToken The first token of the current item.
     * @param {Token} reportItem The item to use when reporting an error.
     * @returns {void}
     * @private
     */
    function validateCommaItemSpacing(previousItemToken, commaToken, currentItemToken, reportItem) {

        // if single line
        if (astUtils.isTokenOnSameLine(commaToken, currentItemToken) &&
                astUtils.isTokenOnSameLine(previousItemToken, commaToken)) {

            return;

        } else if (!astUtils.isTokenOnSameLine(commaToken, currentItemToken) &&
                !astUtils.isTokenOnSameLine(previousItemToken, commaToken)) {

            // lone comma
            context.report(reportItem, {
                line: commaToken.loc.end.line,
                column: commaToken.loc.start.column
            }, "Bad line breaking before and after ','.");

        } else if (style === "first" && !astUtils.isTokenOnSameLine(commaToken, currentItemToken)) {

            context.report(reportItem, "',' should be placed first.");

        } else if (style === "last" && astUtils.isTokenOnSameLine(commaToken, currentItemToken)) {

            context.report(reportItem, {
                line: commaToken.loc.end.line,
                column: commaToken.loc.end.column
            }, "',' should be placed last.");
        }
    }

    /**
     * Checks the comma placement with regards to a declaration/property/element
     * @param {ASTNode} node The binary expression node to check
     * @param {string} property The property of the node containing child nodes.
     * @private
     * @returns {void}
     */
    function validateComma(node, property) {
        var items = node[property],
            arrayLiteral = (node.type === "ArrayExpression"),
            previousItemToken;

        if (items.length > 1 || arrayLiteral) {

            // seed as opening [
            previousItemToken = sourceCode.getFirstToken(node);

            items.forEach(function(item) {
                var commaToken = item ? sourceCode.getTokenBefore(item) : previousItemToken,
                    currentItemToken = item ? sourceCode.getFirstToken(item) : sourceCode.getTokenAfter(commaToken),
                    reportItem = item || currentItemToken,
                    tokenBeforeComma = sourceCode.getTokenBefore(commaToken);

                // Check if previous token is wrapped in parentheses
                if (tokenBeforeComma && tokenBeforeComma.value === ")") {
                    previousItemToken = tokenBeforeComma;
                }

                /*
                 * This works by comparing three token locations:
                 * - previousItemToken is the last token of the previous item
                 * - commaToken is the location of the comma before the current item
                 * - currentItemToken is the first token of the current item
                 *
                 * These values get switched around if item is undefined.
                 * previousItemToken will refer to the last token not belonging
                 * to the current item, which could be a comma or an opening
                 * square bracket. currentItemToken could be a comma.
                 *
                 * All comparisons are done based on these tokens directly, so
                 * they are always valid regardless of an undefined item.
                 */
                if (isComma(commaToken)) {
                    validateCommaItemSpacing(previousItemToken, commaToken,
                            currentItemToken, reportItem);
                }

                previousItemToken = item ? sourceCode.getLastToken(item) : previousItemToken;
            });

            /*
             * Special case for array literals that have empty last items, such
             * as [ 1, 2, ]. These arrays only have two items show up in the
             * AST, so we need to look at the token to verify that there's no
             * dangling comma.
             */
            if (arrayLiteral) {

                var lastToken = sourceCode.getLastToken(node),
                    nextToLastToken = sourceCode.getTokenBefore(lastToken);

                if (isComma(nextToLastToken)) {
                    validateCommaItemSpacing(
                        sourceCode.getTokenBefore(nextToLastToken),
                        nextToLastToken,
                        lastToken,
                        lastToken
                    );
                }
            }
        }
    }

    //--------------------------------------------------------------------------
    // Public
    //--------------------------------------------------------------------------

    var nodes = {};

    if (!exceptions.VariableDeclaration) {
        nodes.VariableDeclaration = function(node) {
            validateComma(node, "declarations");
        };
    }
    if (!exceptions.ObjectExpression) {
        nodes.ObjectExpression = function(node) {
            validateComma(node, "properties");
        };
    }
    if (!exceptions.ArrayExpression) {
        nodes.ArrayExpression = function(node) {
            validateComma(node, "elements");
        };
    }

    return nodes;
}

};

},{“../ast-utils”:124}],153:[function(require,module,exports){ /**

* @fileoverview Counts the cyclomatic complexity of each function of the script. See http://en.wikipedia.org/wiki/Cyclomatic_complexity.
* Counts the number of if, conditional, for, whilte, try, switch/case,
* @author Patrick Brosset
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "enforce a maximum cyclomatic complexity allowed in a program",
        category: "Best Practices",
        recommended: false
    },

    schema: [
        {
            oneOf: [
                {
                    type: "integer",
                    minimum: 0
                },
                {
                    type: "object",
                    properties: {
                        maximum: {
                            type: "integer",
                            minimum: 0
                        },
                        max: {
                            type: "integer",
                            minimum: 0
                        }
                    },
                    additionalProperties: false
                }
            ]
        }
    ]
},

create: function(context) {
    var option = context.options[0],
        THRESHOLD = 20;

    if (typeof option === "object" && option.hasOwnProperty("maximum") && typeof option.maximum === "number") {
        THRESHOLD = option.maximum;
    }
    if (typeof option === "object" && option.hasOwnProperty("max") && typeof option.max === "number") {
        THRESHOLD = option.max;
    }
    if (typeof option === "number") {
        THRESHOLD = option;
    }

    //--------------------------------------------------------------------------
    // Helpers
    //--------------------------------------------------------------------------

    // Using a stack to store complexity (handling nested functions)
    var fns = [];

    /**
     * When parsing a new function, store it in our function stack
     * @returns {void}
     * @private
     */
    function startFunction() {
        fns.push(1);
    }

    /**
     * Evaluate the node at the end of function
     * @param {ASTNode} node node to evaluate
     * @returns {void}
     * @private
     */
    function endFunction(node) {
        var complexity = fns.pop(),
            name = "anonymous";

        if (node.id) {
            name = node.id.name;
        } else if (node.parent.type === "MethodDefinition" || node.parent.type === "Property") {
            name = node.parent.key.name;
        }

        if (complexity > THRESHOLD) {
            context.report(node, "Function '{{name}}' has a complexity of {{complexity}}.", { name: name, complexity: complexity });
        }
    }

    /**
     * Increase the complexity of the function in context
     * @returns {void}
     * @private
     */
    function increaseComplexity() {
        if (fns.length) {
            fns[fns.length - 1]++;
        }
    }

    /**
     * Increase the switch complexity in context
     * @param {ASTNode} node node to evaluate
     * @returns {void}
     * @private
     */
    function increaseSwitchComplexity(node) {

        // Avoiding `default`
        if (node.test) {
            increaseComplexity(node);
        }
    }

    /**
     * Increase the logical path complexity in context
     * @param {ASTNode} node node to evaluate
     * @returns {void}
     * @private
     */
    function increaseLogicalComplexity(node) {

        // Avoiding &&
        if (node.operator === "||") {
            increaseComplexity(node);
        }
    }

    //--------------------------------------------------------------------------
    // Public API
    //--------------------------------------------------------------------------

    return {
        FunctionDeclaration: startFunction,
        FunctionExpression: startFunction,
        ArrowFunctionExpression: startFunction,
        "FunctionDeclaration:exit": endFunction,
        "FunctionExpression:exit": endFunction,
        "ArrowFunctionExpression:exit": endFunction,

        CatchClause: increaseComplexity,
        ConditionalExpression: increaseComplexity,
        LogicalExpression: increaseLogicalComplexity,
        ForStatement: increaseComplexity,
        ForInStatement: increaseComplexity,
        ForOfStatement: increaseComplexity,
        IfStatement: increaseComplexity,
        SwitchCase: increaseSwitchComplexity,
        WhileStatement: increaseComplexity,
        DoWhileStatement: increaseComplexity
    };

}

};

},{}],154:[function(require,module,exports){ /**

* @fileoverview Disallows or enforces spaces inside computed properties.
* @author Jamund Ferguson
*/

“use strict”;

var astUtils = require(“../ast-utils”);

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "enforce consistent spacing inside computed property brackets",
        category: "Stylistic Issues",
        recommended: false
    },

    fixable: "whitespace",

    schema: [
        {
            enum: ["always", "never"]
        }
    ]
},

create: function(context) {
    var sourceCode = context.getSourceCode();
    var propertyNameMustBeSpaced = context.options[0] === "always"; // default is "never"

    //--------------------------------------------------------------------------
    // Helpers
    //--------------------------------------------------------------------------

    /**
    * Reports that there shouldn't be a space after the first token
    * @param {ASTNode} node - The node to report in the event of an error.
    * @param {Token} token - The token to use for the report.
    * @param {Token} tokenAfter - The token after `token`.
    * @returns {void}
    */
    function reportNoBeginningSpace(node, token, tokenAfter) {
        context.report({
            node: node,
            loc: token.loc.start,
            message: "There should be no space after '" + token.value + "'",
            fix: function(fixer) {
                return fixer.removeRange([token.range[1], tokenAfter.range[0]]);
            }
        });
    }

    /**
    * Reports that there shouldn't be a space before the last token
    * @param {ASTNode} node - The node to report in the event of an error.
    * @param {Token} token - The token to use for the report.
    * @param {Token} tokenBefore - The token before `token`.
    * @returns {void}
    */
    function reportNoEndingSpace(node, token, tokenBefore) {
        context.report({
            node: node,
            loc: token.loc.start,
            message: "There should be no space before '" + token.value + "'",
            fix: function(fixer) {
                return fixer.removeRange([tokenBefore.range[1], token.range[0]]);
            }
        });
    }

    /**
    * Reports that there should be a space after the first token
    * @param {ASTNode} node - The node to report in the event of an error.
    * @param {Token} token - The token to use for the report.
    * @returns {void}
    */
    function reportRequiredBeginningSpace(node, token) {
        context.report({
            node: node,
            loc: token.loc.start,
            message: "A space is required after '" + token.value + "'",
            fix: function(fixer) {
                return fixer.insertTextAfter(token, " ");
            }
        });
    }

    /**
    * Reports that there should be a space before the last token
    * @param {ASTNode} node - The node to report in the event of an error.
    * @param {Token} token - The token to use for the report.
    * @returns {void}
    */
    function reportRequiredEndingSpace(node, token) {
        context.report({
            node: node,
            loc: token.loc.start,
            message: "A space is required before '" + token.value + "'",
            fix: function(fixer) {
                return fixer.insertTextBefore(token, " ");
            }
        });
    }

    /**
     * Returns a function that checks the spacing of a node on the property name
     * that was passed in.
     * @param {String} propertyName The property on the node to check for spacing
     * @returns {Function} A function that will check spacing on a node
     */
    function checkSpacing(propertyName) {
        return function(node) {
            if (!node.computed) {
                return;
            }

            var property = node[propertyName];

            var before = sourceCode.getTokenBefore(property),
                first = sourceCode.getFirstToken(property),
                last = sourceCode.getLastToken(property),
                after = sourceCode.getTokenAfter(property);

            if (astUtils.isTokenOnSameLine(before, first)) {
                if (propertyNameMustBeSpaced) {
                    if (!sourceCode.isSpaceBetweenTokens(before, first) && astUtils.isTokenOnSameLine(before, first)) {
                        reportRequiredBeginningSpace(node, before);
                    }
                } else {
                    if (sourceCode.isSpaceBetweenTokens(before, first)) {
                        reportNoBeginningSpace(node, before, first);
                    }
                }
            }

            if (astUtils.isTokenOnSameLine(last, after)) {
                if (propertyNameMustBeSpaced) {
                    if (!sourceCode.isSpaceBetweenTokens(last, after) && astUtils.isTokenOnSameLine(last, after)) {
                        reportRequiredEndingSpace(node, after);
                    }
                } else {
                    if (sourceCode.isSpaceBetweenTokens(last, after)) {
                        reportNoEndingSpace(node, after, last);
                    }
                }
            }
        };
    }

    //--------------------------------------------------------------------------
    // Public
    //--------------------------------------------------------------------------

    return {
        Property: checkSpacing("key"),
        MemberExpression: checkSpacing("property")
    };

}

};

},{“../ast-utils”:124}],155:[function(require,module,exports){ /**

* @fileoverview Rule to flag consistent return values
* @author Nicholas C. Zakas
*/

“use strict”;

//—————————————————————————— // Requirements //——————————————————————————

var astUtils = require(“../ast-utils”);

//—————————————————————————— // Helpers //——————————————————————————

/**

* Checks whether or not a given node is an `Identifier` node which was named a given name.
* @param {ASTNode} node - A node to check.
* @param {string} name - An expected name of the node.
* @returns {boolean} `true` if the node is an `Identifier` node which was named as expected.
*/

function isIdentifier(node, name) {

return node.type === "Identifier" && node.name === name;

}

/**

* Checks whether or not a given code path segment is unreachable.
* @param {CodePathSegment} segment - A CodePathSegment to check.
* @returns {boolean} `true` if the segment is unreachable.
*/

function isUnreachable(segment) {

return !segment.reachable;

}

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "require `return` statements to either always or never specify values",
        category: "Best Practices",
        recommended: false
    },

    schema: [{
        type: "object",
        properties: {
            treatUndefinedAsUnspecified: {
                type: "boolean"
            }
        },
        additionalProperties: false
    }]
},

create: function(context) {
    var options = context.options[0] || {};
    var treatUndefinedAsUnspecified = options.treatUndefinedAsUnspecified === true;
    var funcInfo = null;

    /**
     * Checks whether of not the implicit returning is consistent if the last
     * code path segment is reachable.
     *
     * @param {ASTNode} node - A program/function node to check.
     * @returns {void}
     */
    function checkLastSegment(node) {
        var loc, type;

        /*
         * Skip if it expected no return value or unreachable.
         * When unreachable, all paths are returned or thrown.
         */
        if (!funcInfo.hasReturnValue ||
            funcInfo.codePath.currentSegments.every(isUnreachable) ||
            astUtils.isES5Constructor(node)
        ) {
            return;
        }

        // Adjust a location and a message.
        if (node.type === "Program") {

            // The head of program.
            loc = {line: 1, column: 0};
            type = "program";
        } else if (node.type === "ArrowFunctionExpression") {

            // `=>` token
            loc = context.getSourceCode().getTokenBefore(node.body).loc.start;
            type = "function";
        } else if (
            node.parent.type === "MethodDefinition" ||
            (node.parent.type === "Property" && node.parent.method)
        ) {

            // Method name.
            loc = node.parent.key.loc.start;
            type = "method";
        } else {

            // Function name or `function` keyword.
            loc = (node.id || node).loc.start;
            type = "function";
        }

        // Reports.
        context.report({
            node: node,
            loc: loc,
            message: "Expected to return a value at the end of this {{type}}.",
            data: {type: type}
        });
    }

    return {

        // Initializes/Disposes state of each code path.
        onCodePathStart: function(codePath) {
            funcInfo = {
                upper: funcInfo,
                codePath: codePath,
                hasReturn: false,
                hasReturnValue: false,
                message: ""
            };
        },
        onCodePathEnd: function() {
            funcInfo = funcInfo.upper;
        },

        // Reports a given return statement if it's inconsistent.
        ReturnStatement: function(node) {
            var argument = node.argument;
            var hasReturnValue = Boolean(argument);

            if (treatUndefinedAsUnspecified && hasReturnValue) {
                hasReturnValue = !isIdentifier(argument, "undefined") && argument.operator !== "void";
            }

            if (!funcInfo.hasReturn) {
                funcInfo.hasReturn = true;
                funcInfo.hasReturnValue = hasReturnValue;
                funcInfo.message = "Expected " + (hasReturnValue ? "a" : "no") + " return value.";
            } else if (funcInfo.hasReturnValue !== hasReturnValue) {
                context.report({node: node, message: funcInfo.message});
            }
        },

        // Reports a given program/function if the implicit returning is not consistent.
        "Program:exit": checkLastSegment,
        "FunctionDeclaration:exit": checkLastSegment,
        "FunctionExpression:exit": checkLastSegment,
        "ArrowFunctionExpression:exit": checkLastSegment
    };
}

};

},{“../ast-utils”:124}],156:[function(require,module,exports){ /**

* @fileoverview Rule to enforce consistent naming of "this" context variables
* @author Raphael Pigulla
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "enforce consistent naming when capturing the current execution context",
        category: "Stylistic Issues",
        recommended: false
    },

    schema: {
        type: "array",
        items: {
            type: "string",
            minLength: 1
        },
        uniqueItems: true
    }
},

create: function(context) {
    var aliases = [];

    if (context.options.length === 0) {
        aliases.push("that");
    } else {
        aliases = context.options;
    }

    /**
     * Reports that a variable declarator or assignment expression is assigning
     * a non-'this' value to the specified alias.
     * @param {ASTNode} node - The assigning node.
     * @param {string} alias - the name of the alias that was incorrectly used.
     * @returns {void}
     */
    function reportBadAssignment(node, alias) {
        context.report(node,
            "Designated alias '{{alias}}' is not assigned to 'this'.",
            { alias: alias });
    }

    /**
     * Checks that an assignment to an identifier only assigns 'this' to the
     * appropriate alias, and the alias is only assigned to 'this'.
     * @param {ASTNode} node - The assigning node.
     * @param {Identifier} name - The name of the variable assigned to.
     * @param {Expression} value - The value of the assignment.
     * @returns {void}
     */
    function checkAssignment(node, name, value) {
        var isThis = value.type === "ThisExpression";

        if (aliases.indexOf(name) !== -1) {
            if (!isThis || node.operator && node.operator !== "=") {
                reportBadAssignment(node, name);
            }
        } else if (isThis) {
            context.report(node,
                "Unexpected alias '{{name}}' for 'this'.", { name: name });
        }
    }

    /**
     * Ensures that a variable declaration of the alias in a program or function
     * is assigned to the correct value.
     * @param {string} alias alias the check the assignment of.
     * @param {object} scope scope of the current code we are checking.
     * @private
     * @returns {void}
     */
    function checkWasAssigned(alias, scope) {
        var variable = scope.set.get(alias);

        if (!variable) {
            return;
        }

        if (variable.defs.some(function(def) {
            return def.node.type === "VariableDeclarator" &&
            def.node.init !== null;
        })) {
            return;
        }

        // The alias has been declared and not assigned: check it was
        // assigned later in the same scope.
        if (!variable.references.some(function(reference) {
            var write = reference.writeExpr;

            return (
                reference.from === scope &&
                write && write.type === "ThisExpression" &&
                write.parent.operator === "="
            );
        })) {
            variable.defs.map(function(def) {
                return def.node;
            }).forEach(function(node) {
                reportBadAssignment(node, alias);
            });
        }
    }

    /**
     * Check each alias to ensure that is was assinged to the correct value.
     * @returns {void}
     */
    function ensureWasAssigned() {
        var scope = context.getScope();

        aliases.forEach(function(alias) {
            checkWasAssigned(alias, scope);
        });
    }

    return {
        "Program:exit": ensureWasAssigned,
        "FunctionExpression:exit": ensureWasAssigned,
        "FunctionDeclaration:exit": ensureWasAssigned,

        VariableDeclarator: function(node) {
            var id = node.id;
            var isDestructuring =
                id.type === "ArrayPattern" || id.type === "ObjectPattern";

            if (node.init !== null && !isDestructuring) {
                checkAssignment(node, id.name, node.init);
            }
        },

        AssignmentExpression: function(node) {
            if (node.left.type === "Identifier") {
                checkAssignment(node, node.left.name, node.right);
            }
        }
    };

}

};

},{}],157:[function(require,module,exports){ /**

* @fileoverview A rule to verify `super()` callings in constructor.
* @author Toru Nagashima
*/

“use strict”;

//—————————————————————————— // Helpers //——————————————————————————

/**

* Checks whether a given code path segment is reachable or not.
*
* @param {CodePathSegment} segment - A code path segment to check.
* @returns {boolean} `true` if the segment is reachable.
*/

function isReachable(segment) {

return segment.reachable;

}

/**

* Checks whether or not a given node is a constructor.
* @param {ASTNode} node - A node to check. This node type is one of
*   `Program`, `FunctionDeclaration`, `FunctionExpression`, and
*   `ArrowFunctionExpression`.
* @returns {boolean} `true` if the node is a constructor.
*/

function isConstructorFunction(node) {

return (
    node.type === "FunctionExpression" &&
    node.parent.type === "MethodDefinition" &&
    node.parent.kind === "constructor"
);

}

/**

* Checks whether a given node can be a constructor or not.
*
* @param {ASTNode} node - A node to check.
* @returns {boolean} `true` if the node can be a constructor.
*/

function isPossibleConstructor(node) {

if (!node) {
    return false;
}

switch (node.type) {
    case "ClassExpression":
    case "FunctionExpression":
    case "ThisExpression":
    case "MemberExpression":
    case "CallExpression":
    case "NewExpression":
    case "YieldExpression":
    case "TaggedTemplateExpression":
    case "MetaProperty":
        return true;

    case "Identifier":
        return node.name !== "undefined";

    case "AssignmentExpression":
        return isPossibleConstructor(node.right);

    case "LogicalExpression":
        return (
            isPossibleConstructor(node.left) ||
            isPossibleConstructor(node.right)
        );

    case "ConditionalExpression":
        return (
            isPossibleConstructor(node.alternate) ||
            isPossibleConstructor(node.consequent)
        );

    case "SequenceExpression":
        var lastExpression = node.expressions[node.expressions.length - 1];

        return isPossibleConstructor(lastExpression);

    default:
        return false;
}

}

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "require `super()` calls in constructors",
        category: "ECMAScript 6",
        recommended: true
    },

    schema: []
},

create: function(context) {

    /*
     * {{hasExtends: boolean, scope: Scope, codePath: CodePath}[]}
     * Information for each constructor.
     * - upper:      Information of the upper constructor.
     * - hasExtends: A flag which shows whether own class has a valid `extends`
     *               part.
     * - scope:      The scope of own class.
     * - codePath:   The code path object of the constructor.
     */
    var funcInfo = null;

    /*
     * {Map<string, {calledInSomePaths: boolean, calledInEveryPaths: boolean}>}
     * Information for each code path segment.
     * - calledInSomePaths:  A flag of be called `super()` in some code paths.
     * - calledInEveryPaths: A flag of be called `super()` in all code paths.
     * - validNodes:
     */
    var segInfoMap = Object.create(null);

    /**
     * Gets the flag which shows `super()` is called in some paths.
     * @param {CodePathSegment} segment - A code path segment to get.
     * @returns {boolean} The flag which shows `super()` is called in some paths
     */
    function isCalledInSomePath(segment) {
        return segment.reachable && segInfoMap[segment.id].calledInSomePaths;
    }

    /**
     * Gets the flag which shows `super()` is called in all paths.
     * @param {CodePathSegment} segment - A code path segment to get.
     * @returns {boolean} The flag which shows `super()` is called in all paths.
     */
    function isCalledInEveryPath(segment) {

        /*
         * If specific segment is the looped segment of the current segment,
         * skip the segment.
         * If not skipped, this never becomes true after a loop.
         */
        if (segment.nextSegments.length === 1 &&
            segment.nextSegments[0].isLoopedPrevSegment(segment)
        ) {
            return true;
        }
        return segment.reachable && segInfoMap[segment.id].calledInEveryPaths;
    }

    return {

        /**
         * Stacks a constructor information.
         * @param {CodePath} codePath - A code path which was started.
         * @param {ASTNode} node - The current node.
         * @returns {void}
         */
        onCodePathStart: function(codePath, node) {
            if (isConstructorFunction(node)) {

                // Class > ClassBody > MethodDefinition > FunctionExpression
                var classNode = node.parent.parent.parent;
                var superClass = classNode.superClass;

                funcInfo = {
                    upper: funcInfo,
                    isConstructor: true,
                    hasExtends: Boolean(superClass),
                    superIsConstructor: isPossibleConstructor(superClass),
                    codePath: codePath
                };
            } else {
                funcInfo = {
                    upper: funcInfo,
                    isConstructor: false,
                    hasExtends: false,
                    superIsConstructor: false,
                    codePath: codePath
                };
            }
        },

        /**
         * Pops a constructor information.
         * And reports if `super()` lacked.
         * @param {CodePath} codePath - A code path which was ended.
         * @param {ASTNode} node - The current node.
         * @returns {void}
         */
        onCodePathEnd: function(codePath, node) {
            var hasExtends = funcInfo.hasExtends;

            // Pop.
            funcInfo = funcInfo.upper;

            if (!hasExtends) {
                return;
            }

            // Reports if `super()` lacked.
            var segments = codePath.returnedSegments;
            var calledInEveryPaths = segments.every(isCalledInEveryPath);
            var calledInSomePaths = segments.some(isCalledInSomePath);

            if (!calledInEveryPaths) {
                context.report({
                    message: calledInSomePaths ?
                        "Lacked a call of 'super()' in some code paths." :
                        "Expected to call 'super()'.",
                    node: node.parent
                });
            }
        },

        /**
         * Initialize information of a given code path segment.
         * @param {CodePathSegment} segment - A code path segment to initialize.
         * @returns {void}
         */
        onCodePathSegmentStart: function(segment) {
            if (!(funcInfo && funcInfo.isConstructor && funcInfo.hasExtends)) {
                return;
            }

            // Initialize info.
            var info = segInfoMap[segment.id] = {
                calledInSomePaths: false,
                calledInEveryPaths: false,
                validNodes: []
            };

            // When there are previous segments, aggregates these.
            var prevSegments = segment.prevSegments;

            if (prevSegments.length > 0) {
                info.calledInSomePaths = prevSegments.some(isCalledInSomePath);
                info.calledInEveryPaths = prevSegments.every(isCalledInEveryPath);
            }
        },

        /**
         * Update information of the code path segment when a code path was
         * looped.
         * @param {CodePathSegment} fromSegment - The code path segment of the
         *      end of a loop.
         * @param {CodePathSegment} toSegment - A code path segment of the head
         *      of a loop.
         * @returns {void}
         */
        onCodePathSegmentLoop: function(fromSegment, toSegment) {
            if (!(funcInfo && funcInfo.isConstructor && funcInfo.hasExtends)) {
                return;
            }

            // Update information inside of the loop.
            var isRealLoop = toSegment.prevSegments.length >= 2;

            funcInfo.codePath.traverseSegments(
                {first: toSegment, last: fromSegment},
                function(segment) {
                    var info = segInfoMap[segment.id];
                    var prevSegments = segment.prevSegments;

                    // Updates flags.
                    info.calledInSomePaths = prevSegments.some(isCalledInSomePath);
                    info.calledInEveryPaths = prevSegments.every(isCalledInEveryPath);

                    // If flags become true anew, reports the valid nodes.
                    if (info.calledInSomePaths || isRealLoop) {
                        var nodes = info.validNodes;

                        info.validNodes = [];

                        for (var i = 0; i < nodes.length; ++i) {
                            var node = nodes[i];

                            context.report({
                                message: "Unexpected duplicate 'super()'.",
                                node: node
                            });
                        }
                    }
                }
            );
        },

        /**
         * Checks for a call of `super()`.
         * @param {ASTNode} node - A CallExpression node to check.
         * @returns {void}
         */
        "CallExpression:exit": function(node) {
            if (!(funcInfo && funcInfo.isConstructor)) {
                return;
            }

            // Skips except `super()`.
            if (node.callee.type !== "Super") {
                return;
            }

            // Reports if needed.
            if (funcInfo.hasExtends) {
                var segments = funcInfo.codePath.currentSegments;
                var reachable = false;
                var duplicate = false;

                for (var i = 0; i < segments.length; ++i) {
                    var segment = segments[i];

                    if (segment.reachable) {
                        var info = segInfoMap[segment.id];

                        reachable = true;
                        duplicate = duplicate || info.calledInSomePaths;
                        info.calledInSomePaths = info.calledInEveryPaths = true;
                    }
                }

                if (reachable) {
                    if (duplicate) {
                        context.report({
                            message: "Unexpected duplicate 'super()'.",
                            node: node
                        });
                    } else if (!funcInfo.superIsConstructor) {
                        context.report({
                            message: "Unexpected 'super()' because 'super' is not a constructor.",
                            node: node
                        });
                    } else {
                        info.validNodes.push(node);
                    }
                }
            } else if (funcInfo.codePath.currentSegments.some(isReachable)) {
                context.report({
                    message: "Unexpected 'super()'.",
                    node: node
                });
            }
        },

        /**
         * Set the mark to the returned path as `super()` was called.
         * @param {ASTNode} node - A ReturnStatement node to check.
         * @returns {void}
         */
        ReturnStatement: function(node) {
            if (!(funcInfo && funcInfo.isConstructor && funcInfo.hasExtends)) {
                return;
            }

            // Skips if no argument.
            if (!node.argument) {
                return;
            }

            // Returning argument is a substitute of 'super()'.
            var segments = funcInfo.codePath.currentSegments;

            for (var i = 0; i < segments.length; ++i) {
                var segment = segments[i];

                if (segment.reachable) {
                    var info = segInfoMap[segment.id];

                    info.calledInSomePaths = info.calledInEveryPaths = true;
                }
            }
        },

        /**
         * Resets state.
         * @returns {void}
         */
        "Program:exit": function() {
            segInfoMap = Object.create(null);
        }
    };
}

};

},{}],158:[function(require,module,exports){ /**

* @fileoverview Rule to flag statements without curly braces
* @author Nicholas C. Zakas
*/

“use strict”;

//—————————————————————————— // Requirements //——————————————————————————

var astUtils = require(“../ast-utils”);

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "enforce consistent brace style for all control statements",
        category: "Best Practices",
        recommended: false
    },

    schema: {
        anyOf: [
            {
                type: "array",
                items: [
                    {
                        enum: ["all"]
                    }
                ],
                minItems: 0,
                maxItems: 1
            },
            {
                type: "array",
                items: [
                    {
                        enum: ["multi", "multi-line", "multi-or-nest"]
                    },
                    {
                        enum: ["consistent"]
                    }
                ],
                minItems: 0,
                maxItems: 2
            }
        ]
    }
},

create: function(context) {

    var multiOnly = (context.options[0] === "multi");
    var multiLine = (context.options[0] === "multi-line");
    var multiOrNest = (context.options[0] === "multi-or-nest");
    var consistent = (context.options[1] === "consistent");

    var sourceCode = context.getSourceCode();

    //--------------------------------------------------------------------------
    // Helpers
    //--------------------------------------------------------------------------

    /**
     * Determines if a given node is a one-liner that's on the same line as it's preceding code.
     * @param {ASTNode} node The node to check.
     * @returns {boolean} True if the node is a one-liner that's on the same line as it's preceding code.
     * @private
     */
    function isCollapsedOneLiner(node) {
        var before = sourceCode.getTokenBefore(node),
            last = sourceCode.getLastToken(node);

        return before.loc.start.line === last.loc.end.line;
    }

    /**
     * Determines if a given node is a one-liner.
     * @param {ASTNode} node The node to check.
     * @returns {boolean} True if the node is a one-liner.
     * @private
     */
    function isOneLiner(node) {
        var first = sourceCode.getFirstToken(node),
            last = sourceCode.getLastToken(node);

        return first.loc.start.line === last.loc.end.line;
    }

    /**
     * Gets the `else` keyword token of a given `IfStatement` node.
     * @param {ASTNode} node - A `IfStatement` node to get.
     * @returns {Token} The `else` keyword token.
     */
    function getElseKeyword(node) {
        var token = sourceCode.getTokenAfter(node.consequent);

        while (token.type !== "Keyword" || token.value !== "else") {
            token = sourceCode.getTokenAfter(token);
        }

        return token;
    }

    /**
     * Checks a given IfStatement node requires braces of the consequent chunk.
     * This returns `true` when below:
     *
     * 1. The given node has the `alternate` node.
     * 2. There is a `IfStatement` which doesn't have `alternate` node in the
     *    trailing statement chain of the `consequent` node.
     *
     * @param {ASTNode} node - A IfStatement node to check.
     * @returns {boolean} `true` if the node requires braces of the consequent chunk.
     */
    function requiresBraceOfConsequent(node) {
        if (node.alternate && node.consequent.type === "BlockStatement") {
            if (node.consequent.body.length >= 2) {
                return true;
            }

            node = node.consequent.body[0];
            while (node) {
                if (node.type === "IfStatement" && !node.alternate) {
                    return true;
                }
                node = astUtils.getTrailingStatement(node);
            }
        }

        return false;
    }

    /**
     * Reports "Expected { after ..." error
     * @param {ASTNode} node The node to report.
     * @param {string} name The name to report.
     * @param {string} suffix Additional string to add to the end of a report.
     * @returns {void}
     * @private
     */
    function reportExpectedBraceError(node, name, suffix) {
        context.report({
            node: node,
            loc: (name !== "else" ? node : getElseKeyword(node)).loc.start,
            message: "Expected { after '{{name}}'{{suffix}}.",
            data: {
                name: name,
                suffix: (suffix ? " " + suffix : "")
            }
        });
    }

    /**
     * Reports "Unnecessary { after ..." error
     * @param {ASTNode} node The node to report.
     * @param {string} name The name to report.
     * @param {string} suffix Additional string to add to the end of a report.
     * @returns {void}
     * @private
     */
    function reportUnnecessaryBraceError(node, name, suffix) {
        context.report({
            node: node,
            loc: (name !== "else" ? node : getElseKeyword(node)).loc.start,
            message: "Unnecessary { after '{{name}}'{{suffix}}.",
            data: {
                name: name,
                suffix: (suffix ? " " + suffix : "")
            }
        });
    }

    /**
     * Prepares to check the body of a node to see if it's a block statement.
     * @param {ASTNode} node The node to report if there's a problem.
     * @param {ASTNode} body The body node to check for blocks.
     * @param {string} name The name to report if there's a problem.
     * @param {string} suffix Additional string to add to the end of a report.
     * @returns {object} a prepared check object, with "actual", "expected", "check" properties.
     *   "actual" will be `true` or `false` whether the body is already a block statement.
     *   "expected" will be `true` or `false` if the body should be a block statement or not, or
     *   `null` if it doesn't matter, depending on the rule options. It can be modified to change
     *   the final behavior of "check".
     *   "check" will be a function reporting appropriate problems depending on the other
     *   properties.
     */
    function prepareCheck(node, body, name, suffix) {
        var hasBlock = (body.type === "BlockStatement");
        var expected = null;

        if (node.type === "IfStatement" && node.consequent === body && requiresBraceOfConsequent(node)) {
            expected = true;
        } else if (multiOnly) {
            if (hasBlock && body.body.length === 1) {
                expected = false;
            }
        } else if (multiLine) {
            if (!isCollapsedOneLiner(body)) {
                expected = true;
            }
        } else if (multiOrNest) {
            if (hasBlock && body.body.length === 1 && isOneLiner(body.body[0])) {
                expected = false;
            } else if (!isOneLiner(body)) {
                expected = true;
            }
        } else {
            expected = true;
        }

        return {
            actual: hasBlock,
            expected: expected,
            check: function() {
                if (this.expected !== null && this.expected !== this.actual) {
                    if (this.expected) {
                        reportExpectedBraceError(node, name, suffix);
                    } else {
                        reportUnnecessaryBraceError(node, name, suffix);
                    }
                }
            }
        };
    }

    /**
     * Prepares to check the bodies of a "if", "else if" and "else" chain.
     * @param {ASTNode} node The first IfStatement node of the chain.
     * @returns {object[]} prepared checks for each body of the chain. See `prepareCheck` for more
     *   information.
     */
    function prepareIfChecks(node) {
        var preparedChecks = [];

        do {
            preparedChecks.push(prepareCheck(node, node.consequent, "if", "condition"));
            if (node.alternate && node.alternate.type !== "IfStatement") {
                preparedChecks.push(prepareCheck(node, node.alternate, "else"));
                break;
            }
            node = node.alternate;
        } while (node);

        if (consistent) {

            /*
             * If any node should have or already have braces, make sure they
             * all have braces.
             * If all nodes shouldn't have braces, make sure they don't.
             */
            var expected = preparedChecks.some(function(preparedCheck) {
                if (preparedCheck.expected !== null) {
                    return preparedCheck.expected;
                }
                return preparedCheck.actual;
            });

            preparedChecks.forEach(function(preparedCheck) {
                preparedCheck.expected = expected;
            });
        }

        return preparedChecks;
    }

    //--------------------------------------------------------------------------
    // Public
    //--------------------------------------------------------------------------

    return {
        IfStatement: function(node) {
            if (node.parent.type !== "IfStatement") {
                prepareIfChecks(node).forEach(function(preparedCheck) {
                    preparedCheck.check();
                });
            }
        },

        WhileStatement: function(node) {
            prepareCheck(node, node.body, "while", "condition").check();
        },

        DoWhileStatement: function(node) {
            prepareCheck(node, node.body, "do").check();
        },

        ForStatement: function(node) {
            prepareCheck(node, node.body, "for", "condition").check();
        },

        ForInStatement: function(node) {
            prepareCheck(node, node.body, "for-in").check();
        },

        ForOfStatement: function(node) {
            prepareCheck(node, node.body, "for-of").check();
        }
    };
}

};

},{“../ast-utils”:124}],159:[function(require,module,exports){ /**

* @fileoverview require default case in switch statements
* @author Aliaksei Shytkin
*/

“use strict”;

var DEFAULT_COMMENT_PATTERN = /^no default$/;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "require `default` cases in <code>switch</code> statements",
        category: "Best Practices",
        recommended: false
    },

    schema: [{
        type: "object",
        properties: {
            commentPattern: {
                type: "string"
            }
        },
        additionalProperties: false
    }]
},

create: function(context) {
    var options = context.options[0] || {};
    var commentPattern = options.commentPattern ?
        new RegExp(options.commentPattern) :
        DEFAULT_COMMENT_PATTERN;

    var sourceCode = context.getSourceCode();

    //--------------------------------------------------------------------------
    // Helpers
    //--------------------------------------------------------------------------

    /**
     * Shortcut to get last element of array
     * @param  {*[]} collection Array
     * @returns {*} Last element
     */
    function last(collection) {
        return collection[collection.length - 1];
    }

    //--------------------------------------------------------------------------
    // Public
    //--------------------------------------------------------------------------

    return {

        SwitchStatement: function(node) {

            if (!node.cases.length) {

                /*
                 * skip check of empty switch because there is no easy way
                 * to extract comments inside it now
                 */
                return;
            }

            var hasDefault = node.cases.some(function(v) {
                return v.test === null;
            });

            if (!hasDefault) {

                var comment;
                var comments;

                var lastCase = last(node.cases);

                comments = sourceCode.getComments(lastCase).trailing;

                if (comments.length) {
                    comment = last(comments);
                }

                if (!comment || !commentPattern.test(comment.value.trim())) {
                    context.report(node, "Expected a default case.");
                }
            }
        }
    };
}

};

},{}],160:[function(require,module,exports){ /**

* @fileoverview Validates newlines before and after dots
* @author Greg Cochard
*/

“use strict”;

var astUtils = require(“../ast-utils”);

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "enforce consistent newlines before and after dots",
        category: "Best Practices",
        recommended: false
    },

    schema: [
        {
            enum: ["object", "property"]
        }
    ]
},

create: function(context) {

    var config = context.options[0];

    // default to onObject if no preference is passed
    var onObject = config === "object" || !config;

    var sourceCode = context.getSourceCode();

    /**
     * Reports if the dot between object and property is on the correct loccation.
     * @param {ASTNode} obj The object owning the property.
     * @param {ASTNode} prop The property of the object.
     * @param {ASTNode} node The corresponding node of the token.
     * @returns {void}
     */
    function checkDotLocation(obj, prop, node) {
        var dot = sourceCode.getTokenBefore(prop);

        if (dot.type === "Punctuator" && dot.value === ".") {
            if (onObject) {
                if (!astUtils.isTokenOnSameLine(obj, dot)) {
                    context.report(node, dot.loc.start, "Expected dot to be on same line as object.");
                }
            } else if (!astUtils.isTokenOnSameLine(dot, prop)) {
                context.report(node, dot.loc.start, "Expected dot to be on same line as property.");
            }
        }
    }

    /**
     * Checks the spacing of the dot within a member expression.
     * @param {ASTNode} node The node to check.
     * @returns {void}
     */
    function checkNode(node) {
        checkDotLocation(node.object, node.property, node);
    }

    return {
        MemberExpression: checkNode
    };
}

};

},{“../ast-utils”:124}],161:[function(require,module,exports){ /**

* @fileoverview Rule to warn about using dot notation instead of square bracket notation when possible.
* @author Josh Perez
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

var validIdentifier = /^[a-zA-Z_$]*$/; var keywords = require(“../util/keywords”);

module.exports = {

meta: {
    docs: {
        description: "enforce dot notation whenever possible",
        category: "Best Practices",
        recommended: false
    },

    schema: [
        {
            type: "object",
            properties: {
                allowKeywords: {
                    type: "boolean"
                },
                allowPattern: {
                    type: "string"
                }
            },
            additionalProperties: false
        }
    ]
},

create: function(context) {
    var options = context.options[0] || {};
    var allowKeywords = options.allowKeywords === void 0 || !!options.allowKeywords;

    var allowPattern;

    if (options.allowPattern) {
        allowPattern = new RegExp(options.allowPattern);
    }

    return {
        MemberExpression: function(node) {
            if (
                node.computed &&
                node.property.type === "Literal" &&
                validIdentifier.test(node.property.value) &&
                (allowKeywords || keywords.indexOf("" + node.property.value) === -1)
            ) {
                if (!(allowPattern && allowPattern.test(node.property.value))) {
                    context.report(node.property, "[" + JSON.stringify(node.property.value) + "] is better written in dot notation.");
                }
            }
            if (
                !allowKeywords &&
                !node.computed &&
                keywords.indexOf("" + node.property.name) !== -1
            ) {
                context.report(node.property, "." + node.property.name + " is a syntax error.");
            }
        }
    };
}

};

},{“../util/keywords”:361}],162:[function(require,module,exports){ /**

* @fileoverview Require file to end with single newline.
* @author Nodeca Team <https://github.com/nodeca>
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "enforce at least one newline at the end of files",
        category: "Stylistic Issues",
        recommended: false
    },

    fixable: "whitespace",

    schema: [
        {
            enum: ["unix", "windows"]
        }
    ]
},

create: function(context) {

    //--------------------------------------------------------------------------
    // Public
    //--------------------------------------------------------------------------

    return {

        Program: function checkBadEOF(node) {

            var sourceCode = context.getSourceCode(),
                src = sourceCode.getText(),
                location = {column: 1},
                linebreakStyle = context.options[0] || "unix",
                linebreak = linebreakStyle === "unix" ? "\n" : "\r\n";

            if (src[src.length - 1] !== "\n") {

                // file is not newline-terminated
                location.line = src.split(/\n/g).length;
                context.report({
                    node: node,
                    loc: location,
                    message: "Newline required at end of file but not found.",
                    fix: function(fixer) {
                        return fixer.insertTextAfterRange([0, src.length], linebreak);
                    }
                });
            }
        }

    };

}

};

},{}],163:[function(require,module,exports){ /**

* @fileoverview Rule to flag statements that use != and == instead of !== and ===
* @author Nicholas C. Zakas
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "require the use of `===` and `!==`",
        category: "Best Practices",
        recommended: false
    },

    schema: [
        {
            enum: ["always", "smart", "allow-null"]
        }
    ]
},

create: function(context) {
    var sourceCode = context.getSourceCode();

    /**
     * Checks if an expression is a typeof expression
     * @param  {ASTNode} node The node to check
     * @returns {boolean} if the node is a typeof expression
     */
    function isTypeOf(node) {
        return node.type === "UnaryExpression" && node.operator === "typeof";
    }

    /**
     * Checks if either operand of a binary expression is a typeof operation
     * @param {ASTNode} node The node to check
     * @returns {boolean} if one of the operands is typeof
     * @private
     */
    function isTypeOfBinary(node) {
        return isTypeOf(node.left) || isTypeOf(node.right);
    }

    /**
     * Checks if operands are literals of the same type (via typeof)
     * @param {ASTNode} node The node to check
     * @returns {boolean} if operands are of same type
     * @private
     */
    function areLiteralsAndSameType(node) {
        return node.left.type === "Literal" && node.right.type === "Literal" &&
                typeof node.left.value === typeof node.right.value;
    }

    /**
     * Checks if one of the operands is a literal null
     * @param {ASTNode} node The node to check
     * @returns {boolean} if operands are null
     * @private
     */
    function isNullCheck(node) {
        return (node.right.type === "Literal" && node.right.value === null) ||
                (node.left.type === "Literal" && node.left.value === null);
    }

    /**
     * Gets the location (line and column) of the binary expression's operator
     * @param {ASTNode} node The binary expression node to check
     * @param {String} operator The operator to find
     * @returns {Object} { line, column } location of operator
     * @private
     */
    function getOperatorLocation(node) {
        var opToken = sourceCode.getTokenAfter(node.left);

        return {line: opToken.loc.start.line, column: opToken.loc.start.column};
    }

    return {
        BinaryExpression: function(node) {
            if (node.operator !== "==" && node.operator !== "!=") {
                return;
            }

            if (context.options[0] === "smart" && (isTypeOfBinary(node) ||
                    areLiteralsAndSameType(node) || isNullCheck(node))) {
                return;
            }

            if (context.options[0] === "allow-null" && isNullCheck(node)) {
                return;
            }

            context.report({
                node: node,
                loc: getOperatorLocation(node),
                message: "Expected '{{op}}=' and instead saw '{{op}}'.",
                data: { op: node.operator }
            });

        }
    };

}

};

},{}],164:[function(require,module,exports){ /**

* @fileoverview Rule to warn when a function expression does not have a name.
* @author Kyle T. Nunery
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "require or disallow named `function` expressions",
        category: "Stylistic Issues",
        recommended: false
    },

    schema: [
        {
            enum: ["always", "never"]
        }
    ]
},

create: function(context) {
    var never = context.options[0] === "never";

    /**
     * Determines whether the current FunctionExpression node is a get, set, or
     * shorthand method in an object literal or a class.
     * @returns {boolean} True if the node is a get, set, or shorthand method.
     */
    function isObjectOrClassMethod() {
        var parent = context.getAncestors().pop();

        return (parent.type === "MethodDefinition" || (
            parent.type === "Property" && (
                parent.method ||
                parent.kind === "get" ||
                parent.kind === "set"
            )
        ));
    }

    return {
        FunctionExpression: function(node) {

            var name = node.id && node.id.name;

            if (never) {
                if (name) {
                    context.report(node, "Unexpected function expression name.");
                }
            } else {
                if (!name && !isObjectOrClassMethod()) {
                    context.report(node, "Missing function expression name.");
                }
            }
        }
    };
}

};

},{}],165:[function(require,module,exports){ /**

* @fileoverview Rule to enforce a particular function style
* @author Nicholas C. Zakas
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "enforce the consistent use of either `function` declarations or expressions",
        category: "Stylistic Issues",
        recommended: false
    },

    schema: [
        {
            enum: ["declaration", "expression"]
        },
        {
            type: "object",
            properties: {
                allowArrowFunctions: {
                    type: "boolean"
                }
            },
            additionalProperties: false
        }
    ]
},

create: function(context) {

    var style = context.options[0],
        allowArrowFunctions = context.options[1] && context.options[1].allowArrowFunctions === true,
        enforceDeclarations = (style === "declaration"),
        stack = [];

    var nodesToCheck = {
        Program: function() {
            stack = [];
        },

        FunctionDeclaration: function(node) {
            stack.push(false);

            if (!enforceDeclarations && node.parent.type !== "ExportDefaultDeclaration") {
                context.report(node, "Expected a function expression.");
            }
        },
        "FunctionDeclaration:exit": function() {
            stack.pop();
        },

        FunctionExpression: function(node) {
            stack.push(false);

            if (enforceDeclarations && node.parent.type === "VariableDeclarator") {
                context.report(node.parent, "Expected a function declaration.");
            }
        },
        "FunctionExpression:exit": function() {
            stack.pop();
        },

        ThisExpression: function() {
            if (stack.length > 0) {
                stack[stack.length - 1] = true;
            }
        }
    };

    if (!allowArrowFunctions) {
        nodesToCheck.ArrowFunctionExpression = function() {
            stack.push(false);
        };

        nodesToCheck["ArrowFunctionExpression:exit"] = function(node) {
            var hasThisExpr = stack.pop();

            if (enforceDeclarations && !hasThisExpr && node.parent.type === "VariableDeclarator") {
                context.report(node.parent, "Expected a function declaration.");
            }
        };
    }

    return nodesToCheck;

}

};

},{}],166:[function(require,module,exports){ /**

* @fileoverview Rule to check the spacing around the * in generator functions.
* @author Jamund Ferguson
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "enforce consistent spacing around `*` operators in generator functions",
        category: "ECMAScript 6",
        recommended: false
    },

    fixable: "whitespace",

    schema: [
        {
            oneOf: [
                {
                    enum: ["before", "after", "both", "neither"]
                },
                {
                    type: "object",
                    properties: {
                        before: {type: "boolean"},
                        after: {type: "boolean"}
                    },
                    additionalProperties: false
                }
            ]
        }
    ]
},

create: function(context) {

    var mode = (function(option) {
        if (!option || typeof option === "string") {
            return {
                before: { before: true, after: false },
                after: { before: false, after: true },
                both: { before: true, after: true },
                neither: { before: false, after: false }
            }[option || "before"];
        }
        return option;
    }(context.options[0]));

    var sourceCode = context.getSourceCode();

    /**
     * Gets `*` token from a given node.
     *
     * @param {ASTNode} node - A node to get `*` token. This is one of
     *      FunctionDeclaration, FunctionExpression, Property, and
     *      MethodDefinition.
     * @returns {Token} `*` token.
     */
    function getStarToken(node) {
        var token = sourceCode.getFirstToken(node);

        while (token.value !== "*") {
            token = sourceCode.getTokenAfter(token);
        }

        return token;
    }

    /**
     * Checks the spacing between two tokens before or after the star token.
     * @param {string} side Either "before" or "after".
     * @param {Token} leftToken `function` keyword token if side is "before", or
     *     star token if side is "after".
     * @param {Token} rightToken Star token if side is "before", or identifier
     *     token if side is "after".
     * @returns {void}
     */
    function checkSpacing(side, leftToken, rightToken) {
        if (!!(rightToken.range[0] - leftToken.range[1]) !== mode[side]) {
            var after = leftToken.value === "*";
            var spaceRequired = mode[side];
            var node = after ? leftToken : rightToken;
            var type = spaceRequired ? "Missing" : "Unexpected";
            var message = type + " space " + side + " *.";

            context.report({
                node: node,
                message: message,
                fix: function(fixer) {
                    if (spaceRequired) {
                        if (after) {
                            return fixer.insertTextAfter(node, " ");
                        }
                        return fixer.insertTextBefore(node, " ");
                    }
                    return fixer.removeRange([leftToken.range[1], rightToken.range[0]]);
                }
            });
        }
    }

    /**
     * Enforces the spacing around the star if node is a generator function.
     * @param {ASTNode} node A function expression or declaration node.
     * @returns {void}
     */
    function checkFunction(node) {
        var prevToken, starToken, nextToken;

        if (!node.generator) {
            return;
        }

        if (node.parent.method || node.parent.type === "MethodDefinition") {
            starToken = getStarToken(node.parent);
        } else {
            starToken = getStarToken(node);
        }

        // Only check before when preceded by `function`|`static` keyword
        prevToken = sourceCode.getTokenBefore(starToken);
        if (prevToken.value === "function" || prevToken.value === "static") {
            checkSpacing("before", prevToken, starToken);
        }

        nextToken = sourceCode.getTokenAfter(starToken);
        checkSpacing("after", starToken, nextToken);
    }

    return {
        FunctionDeclaration: checkFunction,
        FunctionExpression: checkFunction
    };

}

};

},{}],167:[function(require,module,exports){ /**

* @fileoverview Rule for disallowing require() outside of the top-level module context
* @author Jamund Ferguson
*/

“use strict”;

var ACCEPTABLE_PARENTS = [

"AssignmentExpression",
"VariableDeclarator",
"MemberExpression",
"ExpressionStatement",
"CallExpression",
"ConditionalExpression",
"Program",
"VariableDeclaration"

];

/**

* Finds the escope reference in the given scope.
* @param {Object} scope The scope to search.
* @param {ASTNode} node The identifier node.
* @returns {Reference|null} Returns the found reference or null if none were found.
*/

function findReference(scope, node) {

var references = scope.references.filter(function(reference) {
    return reference.identifier.range[0] === node.range[0] &&
        reference.identifier.range[1] === node.range[1];
});

/* istanbul ignore else: correctly returns null */
if (references.length === 1) {
    return references[0];
} else {
    return null;
}

}

/**

* Checks if the given identifier node is shadowed in the given scope.
* @param {Object} scope The current scope.
* @param {ASTNode} node The identifier node to check.
* @returns {boolean} Whether or not the name is shadowed.
*/

function isShadowed(scope, node) {

var reference = findReference(scope, node);

return reference && reference.resolved && reference.resolved.defs.length > 0;

}

module.exports = {

meta: {
    docs: {
        description: "require `require()` calls to be placed at top-level module scope",
        category: "Node.js and CommonJS",
        recommended: false
    },

    schema: []
},

create: function(context) {
    return {
        CallExpression: function(node) {
            var currentScope = context.getScope(),
                isGoodRequire;

            if (node.callee.name === "require" && !isShadowed(currentScope, node.callee)) {
                isGoodRequire = context.getAncestors().every(function(parent) {
                    return ACCEPTABLE_PARENTS.indexOf(parent.type) > -1;
                });
                if (!isGoodRequire) {
                    context.report(node, "Unexpected require().");
                }
            }
        }
    };
}

};

},{}],168:[function(require,module,exports){ /**

* @fileoverview Rule to flag for-in loops without if statements inside
* @author Nicholas C. Zakas
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "require `for-in` loops to include an `if` statement",
        category: "Best Practices",
        recommended: false
    },

    schema: []
},

create: function(context) {

    return {

        ForInStatement: function(node) {

            /*
             * If the for-in statement has {}, then the real body is the body
             * of the BlockStatement. Otherwise, just use body as provided.
             */
            var body = node.body.type === "BlockStatement" ? node.body.body[0] : node.body;

            if (body && body.type !== "IfStatement") {
                context.report(node, "The body of a for-in should be wrapped in an if statement to filter unwanted properties from the prototype.");
            }
        }
    };

}

};

},{}],169:[function(require,module,exports){ /**

* @fileoverview Ensure handling of errors when we know they exist.
* @author Jamund Ferguson
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "require error handling in callbacks",
        category: "Node.js and CommonJS",
        recommended: false
    },

    schema: [
        {
            type: "string"
        }
    ]
},

create: function(context) {

    var errorArgument = context.options[0] || "err";

    /**
     * Checks if the given argument should be interpreted as a regexp pattern.
     * @param {string} stringToCheck The string which should be checked.
     * @returns {boolean} Whether or not the string should be interpreted as a pattern.
     */
    function isPattern(stringToCheck) {
        var firstChar = stringToCheck[0];

        return firstChar === "^";
    }

    /**
     * Checks if the given name matches the configured error argument.
     * @param {string} name The name which should be compared.
     * @returns {boolean} Whether or not the given name matches the configured error variable name.
     */
    function matchesConfiguredErrorName(name) {
        if (isPattern(errorArgument)) {
            var regexp = new RegExp(errorArgument);

            return regexp.test(name);
        }
        return name === errorArgument;
    }

    /**
     * Get the parameters of a given function scope.
     * @param {object} scope The function scope.
     * @returns {array} All parameters of the given scope.
     */
    function getParameters(scope) {
        return scope.variables.filter(function(variable) {
            return variable.defs[0] && variable.defs[0].type === "Parameter";
        });
    }

    /**
     * Check to see if we're handling the error object properly.
     * @param {ASTNode} node The AST node to check.
     * @returns {void}
     */
    function checkForError(node) {
        var scope = context.getScope(),
            parameters = getParameters(scope),
            firstParameter = parameters[0];

        if (firstParameter && matchesConfiguredErrorName(firstParameter.name)) {
            if (firstParameter.references.length === 0) {
                context.report(node, "Expected error to be handled.");
            }
        }
    }

    return {
        FunctionDeclaration: checkForError,
        FunctionExpression: checkForError,
        ArrowFunctionExpression: checkForError
    };

}

};

},{}],170:[function(require,module,exports){ /**

* @fileoverview Rule that warns when identifier names that are
* blacklisted in the configuration are used.
* @author Keith Cirkel (http://keithcirkel.co.uk)
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow specified identifiers",
        category: "Stylistic Issues",
        recommended: false
    },

    schema: {
        type: "array",
        items: {
            type: "string"
        },
        uniqueItems: true
    }
},

create: function(context) {

    //--------------------------------------------------------------------------
    // Helpers
    //--------------------------------------------------------------------------

    var blacklist = context.options;

    /**
     * Checks if a string matches the provided pattern
     * @param {String} name The string to check.
     * @returns {boolean} if the string is a match
     * @private
     */
    function isInvalid(name) {
        return blacklist.indexOf(name) !== -1;
    }

    /**
     * Verifies if we should report an error or not based on the effective
     * parent node and the identifier name.
     * @param {ASTNode} effectiveParent The effective parent node of the node to be reported
     * @param {String} name The identifier name of the identifier node
     * @returns {boolean} whether an error should be reported or not
     */
    function shouldReport(effectiveParent, name) {
        return effectiveParent.type !== "CallExpression"
            && effectiveParent.type !== "NewExpression" &&
            isInvalid(name);
    }

    /**
     * Reports an AST node as a rule violation.
     * @param {ASTNode} node The node to report.
     * @returns {void}
     * @private
     */
    function report(node) {
        context.report(node, "Identifier '{{name}}' is blacklisted", {
            name: node.name
        });
    }

    return {

        Identifier: function(node) {
            var name = node.name,
                effectiveParent = (node.parent.type === "MemberExpression") ? node.parent.parent : node.parent;

            // MemberExpressions get special rules
            if (node.parent.type === "MemberExpression") {

                // Always check object names
                if (node.parent.object.type === "Identifier" &&
                    node.parent.object.name === node.name) {
                    if (isInvalid(name)) {
                        report(node);
                    }

                    // Report AssignmentExpressions only if they are the left side of the assignment
                } else if (effectiveParent.type === "AssignmentExpression" &&
                    (effectiveParent.right.type !== "MemberExpression" ||
                    effectiveParent.left.type === "MemberExpression" &&
                    effectiveParent.left.property.name === node.name)) {
                    if (isInvalid(name)) {
                        report(node);
                    }
                }

            // Properties have their own rules
            } else if (node.parent.type === "Property") {

                if (shouldReport(effectiveParent, name)) {
                    report(node);
                }

            // Report anything that is a match and not a CallExpression
            } else if (shouldReport(effectiveParent, name)) {
                report(node);
            }
        }

    };

}

};

},{}],171:[function(require,module,exports){ /**

* @fileoverview Rule that warns when identifier names are shorter or longer
* than the values provided in configuration.
* @author Burak Yigit Kaya aka BYK
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "enforce minimum and maximum identifier lengths",
        category: "Stylistic Issues",
        recommended: false
    },

    schema: [
        {
            type: "object",
            properties: {
                min: {
                    type: "number"
                },
                max: {
                    type: "number"
                },
                exceptions: {
                    type: "array",
                    uniqueItems: true,
                    items: {
                        type: "string"
                    }
                },
                properties: {
                    enum: ["always", "never"]
                }
            },
            additionalProperties: false
        }
    ]
},

create: function(context) {
    var options = context.options[0] || {};
    var minLength = typeof options.min !== "undefined" ? options.min : 2;
    var maxLength = typeof options.max !== "undefined" ? options.max : Infinity;
    var properties = options.properties !== "never";
    var exceptions = (options.exceptions ? options.exceptions : [])
        .reduce(function(obj, item) {
            obj[item] = true;

            return obj;
        }, {});

    var SUPPORTED_EXPRESSIONS = {
        MemberExpression: properties && function(parent) {
            return !parent.computed && (

                // regular property assignment
                (parent.parent.left === parent || // or the last identifier in an ObjectPattern destructuring
                parent.parent.type === "Property" && parent.parent.value === parent &&
                parent.parent.parent.type === "ObjectPattern" && parent.parent.parent.parent.left === parent.parent.parent)
            );
        },
        AssignmentPattern: function(parent, node) {
            return parent.left === node;
        },
        VariableDeclarator: function(parent, node) {
            return parent.id === node;
        },
        Property: properties && function(parent, node) {
            return parent.key === node;
        },
        ImportDefaultSpecifier: true,
        RestElement: true,
        FunctionExpression: true,
        ArrowFunctionExpression: true,
        ClassDeclaration: true,
        FunctionDeclaration: true,
        MethodDefinition: true,
        CatchClause: true
    };

    return {
        Identifier: function(node) {
            var name = node.name;
            var parent = node.parent;

            var isShort = name.length < minLength;
            var isLong = name.length > maxLength;

            if (!(isShort || isLong) || exceptions[name]) {
                return;  // Nothing to report
            }

            var isValidExpression = SUPPORTED_EXPRESSIONS[parent.type];

            if (isValidExpression && (isValidExpression === true || isValidExpression(parent, node))) {
                context.report(
                    node,
                    isShort ?
                        "Identifier name '{{name}}' is too short. (< {{min}})" :
                        "Identifier name '{{name}}' is too long. (> {{max}})",
                    { name: name, min: minLength, max: maxLength }
                );
            }
        }
    };
}

};

},{}],172:[function(require,module,exports){ /**

* @fileoverview Rule to flag non-matching identifiers
* @author Matthieu Larcher
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "require identifiers to match a specified regular expression",
        category: "Stylistic Issues",
        recommended: false
    },

    schema: [
        {
            type: "string"
        },
        {
            type: "object",
            properties: {
                properties: {
                    type: "boolean"
                }
            }
        }
    ]
},

create: function(context) {

    //--------------------------------------------------------------------------
    // Helpers
    //--------------------------------------------------------------------------

    var pattern = context.options[0] || "^.+$",
        regexp = new RegExp(pattern);

    var options = context.options[1] || {},
        properties = !!options.properties,
        onlyDeclarations = !!options.onlyDeclarations;

    /**
     * Checks if a string matches the provided pattern
     * @param {String} name The string to check.
     * @returns {boolean} if the string is a match
     * @private
     */
    function isInvalid(name) {
        return !regexp.test(name);
    }

    /**
     * Verifies if we should report an error or not based on the effective
     * parent node and the identifier name.
     * @param {ASTNode} effectiveParent The effective parent node of the node to be reported
     * @param {String} name The identifier name of the identifier node
     * @returns {boolean} whether an error should be reported or not
     */
    function shouldReport(effectiveParent, name) {
        return effectiveParent.type !== "CallExpression"
            && effectiveParent.type !== "NewExpression" &&
            isInvalid(name);
    }

    /**
     * Reports an AST node as a rule violation.
     * @param {ASTNode} node The node to report.
     * @returns {void}
     * @private
     */
    function report(node) {
        context.report(node, "Identifier '{{name}}' does not match the pattern '{{pattern}}'.", {
            name: node.name,
            pattern: pattern
        });
    }

    return {

        Identifier: function(node) {
            var name = node.name,
                parent = node.parent,
                effectiveParent = (parent.type === "MemberExpression") ? parent.parent : parent;

            if (parent.type === "MemberExpression") {

                if (!properties) {
                    return;
                }

                // Always check object names
                if (parent.object.type === "Identifier" &&
                    parent.object.name === name) {
                    if (isInvalid(name)) {
                        report(node);
                    }

                // Report AssignmentExpressions only if they are the left side of the assignment
                } else if (effectiveParent.type === "AssignmentExpression" &&
                    (effectiveParent.right.type !== "MemberExpression" ||
                    effectiveParent.left.type === "MemberExpression" &&
                    effectiveParent.left.property.name === name)) {
                    if (isInvalid(name)) {
                        report(node);
                    }
                }

            } else if (parent.type === "Property") {

                if (!properties || parent.key.name !== name) {
                    return;
                }

                if (shouldReport(effectiveParent, name)) {
                    report(node);
                }

            } else {
                var isDeclaration = effectiveParent.type === "FunctionDeclaration" || effectiveParent.type === "VariableDeclarator";

                if (onlyDeclarations && !isDeclaration) {
                    return;
                }

                if (shouldReport(effectiveParent, name)) {
                    report(node);
                }
            }
        }

    };

}

};

},{}],173:[function(require,module,exports){ /**

* @fileoverview This option sets a specific tab width for your code
*
* This rule has been ported and modified from nodeca.
* @author Vitaly Puzrin
* @author Gyandeep Singh
*/

“use strict”;

//—————————————————————————— // Rule Definition //—————————————————————————— var util = require(“util”); var lodash = require(“lodash”);

module.exports = {

meta: {
    docs: {
        description: "enforce consistent indentation",
        category: "Stylistic Issues",
        recommended: false
    },

    fixable: "whitespace",

    schema: [
        {
            oneOf: [
                {
                    enum: ["tab"]
                },
                {
                    type: "integer",
                    minimum: 0
                }
            ]
        },
        {
            type: "object",
            properties: {
                SwitchCase: {
                    type: "integer",
                    minimum: 0
                },
                VariableDeclarator: {
                    oneOf: [
                        {
                            type: "integer",
                            minimum: 0
                        },
                        {
                            type: "object",
                            properties: {
                                var: {
                                    type: "integer",
                                    minimum: 0
                                },
                                let: {
                                    type: "integer",
                                    minimum: 0
                                },
                                const: {
                                    type: "integer",
                                    minimum: 0
                                }
                            }
                        }
                    ]
                }
            },
            additionalProperties: false
        }
    ]
},

create: function(context) {

    var MESSAGE = "Expected indentation of {{needed}} {{type}} {{characters}} but found {{gotten}}.";
    var DEFAULT_VARIABLE_INDENT = 1;

    var indentType = "space";
    var indentSize = 4;
    var options = {
        SwitchCase: 0,
        VariableDeclarator: {
            var: DEFAULT_VARIABLE_INDENT,
            let: DEFAULT_VARIABLE_INDENT,
            const: DEFAULT_VARIABLE_INDENT
        }
    };

    var sourceCode = context.getSourceCode();

    if (context.options.length) {
        if (context.options[0] === "tab") {
            indentSize = 1;
            indentType = "tab";
        } else /* istanbul ignore else : this will be caught by options validation */ if (typeof context.options[0] === "number") {
            indentSize = context.options[0];
            indentType = "space";
        }

        if (context.options[1]) {
            var opts = context.options[1];

            options.SwitchCase = opts.SwitchCase || 0;
            var variableDeclaratorRules = opts.VariableDeclarator;

            if (typeof variableDeclaratorRules === "number") {
                options.VariableDeclarator = {
                    var: variableDeclaratorRules,
                    let: variableDeclaratorRules,
                    const: variableDeclaratorRules
                };
            } else if (typeof variableDeclaratorRules === "object") {
                lodash.assign(options.VariableDeclarator, variableDeclaratorRules);
            }
        }
    }

    var indentPattern = {
        normal: indentType === "space" ? /^ +/ : /^\t+/,
        excludeCommas: indentType === "space" ? /^[ ,]+/ : /^[\t,]+/
    };

    var caseIndentStore = {};

    /**
     * Reports a given indent violation and properly pluralizes the message
     * @param {ASTNode} node Node violating the indent rule
     * @param {int} needed Expected indentation character count
     * @param {int} gotten Indentation character count in the actual node/code
     * @param {Object=} loc Error line and column location
     * @param {boolean} isLastNodeCheck Is the error for last node check
     * @returns {void}
     */
    function report(node, needed, gotten, loc, isLastNodeCheck) {
        var msgContext = {
            needed: needed,
            type: indentType,
            characters: needed === 1 ? "character" : "characters",
            gotten: gotten
        };
        var indentChar = indentType === "space" ? " " : "\t";

        /**
         * Responsible for fixing the indentation issue fix
         * @returns {Function} function to be executed by the fixer
         * @private
         */
        function getFixerFunction() {
            var rangeToFix = [];

            if (needed > gotten) {
                var spaces = "" + new Array(needed - gotten + 1).join(indentChar);  // replace with repeat in future

                if (isLastNodeCheck === true) {
                    rangeToFix = [
                        node.range[1] - 1,
                        node.range[1] - 1
                    ];
                } else {
                    rangeToFix = [
                        node.range[0],
                        node.range[0]
                    ];
                }

                return function(fixer) {
                    return fixer.insertTextBeforeRange(rangeToFix, spaces);
                };
            } else {
                if (isLastNodeCheck === true) {
                    rangeToFix = [
                        node.range[1] - (gotten - needed) - 1,
                        node.range[1] - 1
                    ];
                } else {
                    rangeToFix = [
                        node.range[0] - (gotten - needed),
                        node.range[0]
                    ];
                }

                return function(fixer) {
                    return fixer.removeRange(rangeToFix);
                };
            }
        }

        if (loc) {
            context.report({
                node: node,
                loc: loc,
                message: MESSAGE,
                data: msgContext,
                fix: getFixerFunction()
            });
        } else {
            context.report({
                node: node,
                message: MESSAGE,
                data: msgContext,
                fix: getFixerFunction()
            });
        }
    }

    /**
     * Get node indent
     * @param {ASTNode|Token} node Node to examine
     * @param {boolean} [byLastLine=false] get indent of node's last line
     * @param {boolean} [excludeCommas=false] skip comma on start of line
     * @returns {int} Indent
     */
    function getNodeIndent(node, byLastLine, excludeCommas) {
        var token = byLastLine ? sourceCode.getLastToken(node) : sourceCode.getFirstToken(node);
        var src = sourceCode.getText(token, token.loc.start.column);
        var regExp = excludeCommas ? indentPattern.excludeCommas : indentPattern.normal;
        var indent = regExp.exec(src);

        return indent ? indent[0].length : 0;
    }

    /**
     * Checks node is the first in its own start line. By default it looks by start line.
     * @param {ASTNode} node The node to check
     * @param {boolean} [byEndLocation=false] Lookup based on start position or end
     * @returns {boolean} true if its the first in the its start line
     */
    function isNodeFirstInLine(node, byEndLocation) {
        var firstToken = byEndLocation === true ? sourceCode.getLastToken(node, 1) : sourceCode.getTokenBefore(node),
            startLine = byEndLocation === true ? node.loc.end.line : node.loc.start.line,
            endLine = firstToken ? firstToken.loc.end.line : -1;

        return startLine !== endLine;
    }

    /**
     * Check indent for node
     * @param {ASTNode} node Node to check
     * @param {int} indent needed indent
     * @param {boolean} [excludeCommas=false] skip comma on start of line
     * @returns {void}
     */
    function checkNodeIndent(node, indent, excludeCommas) {
        var nodeIndent = getNodeIndent(node, false, excludeCommas);

        if (
            node.type !== "ArrayExpression" && node.type !== "ObjectExpression" &&
            nodeIndent !== indent && isNodeFirstInLine(node)
        ) {
            report(node, indent, nodeIndent);
        }
    }

    /**
     * Check indent for nodes list
     * @param {ASTNode[]} nodes list of node objects
     * @param {int} indent needed indent
     * @param {boolean} [excludeCommas=false] skip comma on start of line
     * @returns {void}
     */
    function checkNodesIndent(nodes, indent, excludeCommas) {
        nodes.forEach(function(node) {
            if (node.type === "IfStatement" && node.alternate) {
                var elseToken = sourceCode.getTokenBefore(node.alternate);

                checkNodeIndent(elseToken, indent, excludeCommas);
            }
            checkNodeIndent(node, indent, excludeCommas);
        });
    }

    /**
     * Check last node line indent this detects, that block closed correctly
     * @param {ASTNode} node Node to examine
     * @param {int} lastLineIndent needed indent
     * @returns {void}
     */
    function checkLastNodeLineIndent(node, lastLineIndent) {
        var lastToken = sourceCode.getLastToken(node);
        var endIndent = getNodeIndent(lastToken, true);

        if (endIndent !== lastLineIndent && isNodeFirstInLine(node, true)) {
            report(
                node,
                lastLineIndent,
                endIndent,
                { line: lastToken.loc.start.line, column: lastToken.loc.start.column },
                true
            );
        }
    }

    /**
     * Check first node line indent is correct
     * @param {ASTNode} node Node to examine
     * @param {int} firstLineIndent needed indent
     * @returns {void}
     */
    function checkFirstNodeLineIndent(node, firstLineIndent) {
        var startIndent = getNodeIndent(node, false);

        if (startIndent !== firstLineIndent && isNodeFirstInLine(node)) {
            report(
                node,
                firstLineIndent,
                startIndent,
                { line: node.loc.start.line, column: node.loc.start.column }
            );
        }
    }

    /**
     * Returns the VariableDeclarator based on the current node
     * if not present then return null
     * @param {ASTNode} node node to examine
     * @returns {ASTNode|void} if found then node otherwise null
     */
    function getVariableDeclaratorNode(node) {
        var parent = node.parent;

        while (parent.type !== "VariableDeclarator" && parent.type !== "Program") {
            parent = parent.parent;
        }

        return parent.type === "VariableDeclarator" ? parent : null;
    }

    /**
     * Check to see if the node is part of the multi-line variable declaration.
     * Also if its on the same line as the varNode
     * @param {ASTNode} node node to check
     * @param {ASTNode} varNode variable declaration node to check against
     * @returns {boolean} True if all the above condition satisfy
     */
    function isNodeInVarOnTop(node, varNode) {
        return varNode &&
            varNode.parent.loc.start.line === node.loc.start.line &&
            varNode.parent.declarations.length > 1;
    }

    /**
     * Check to see if the argument before the callee node is multi-line and
     * there should only be 1 argument before the callee node
     * @param {ASTNode} node node to check
     * @returns {boolean} True if arguments are multi-line
     */
    function isArgBeforeCalleeNodeMultiline(node) {
        var parent = node.parent;

        if (parent.arguments.length >= 2 && parent.arguments[1] === node) {
            return parent.arguments[0].loc.end.line > parent.arguments[0].loc.start.line;
        }

        return false;
    }

    /**
     * Check indent for function block content
     * @param {ASTNode} node node to examine
     * @returns {void}
     */
    function checkIndentInFunctionBlock(node) {

        /*
         * Search first caller in chain.
         * Ex.:
         *
         * Models <- Identifier
         *   .User
         *   .find()
         *   .exec(function() {
         *   // function body
         * });
         *
         * Looks for 'Models'
         */
        var calleeNode = node.parent; // FunctionExpression
        var indent;

        if (calleeNode.parent &&
            (calleeNode.parent.type === "Property" ||
            calleeNode.parent.type === "ArrayExpression")) {

            // If function is part of array or object, comma can be put at left
            indent = getNodeIndent(calleeNode, false, false);
        } else {

            // If function is standalone, simple calculate indent
            indent = getNodeIndent(calleeNode);
        }

        if (calleeNode.parent.type === "CallExpression") {
            var calleeParent = calleeNode.parent;

            if (calleeNode.type !== "FunctionExpression" && calleeNode.type !== "ArrowFunctionExpression") {
                if (calleeParent && calleeParent.loc.start.line < node.loc.start.line) {
                    indent = getNodeIndent(calleeParent);
                }
            } else {
                if (isArgBeforeCalleeNodeMultiline(calleeNode) &&
                    calleeParent.callee.loc.start.line === calleeParent.callee.loc.end.line &&
                    !isNodeFirstInLine(calleeNode)) {
                    indent = getNodeIndent(calleeParent);
                }
            }
        }

        // function body indent should be indent + indent size
        indent += indentSize;

        // check if the node is inside a variable
        var parentVarNode = getVariableDeclaratorNode(node);

        if (parentVarNode && isNodeInVarOnTop(node, parentVarNode)) {
            indent += indentSize * options.VariableDeclarator[parentVarNode.parent.kind];
        }

        if (node.body.length > 0) {
            checkNodesIndent(node.body, indent);
        }

        checkLastNodeLineIndent(node, indent - indentSize);
    }

    /**
     * Checks if the given node starts and ends on the same line
     * @param {ASTNode} node The node to check
     * @returns {boolean} Whether or not the block starts and ends on the same line.
     */
    function isSingleLineNode(node) {
        var lastToken = sourceCode.getLastToken(node),
            startLine = node.loc.start.line,
            endLine = lastToken.loc.end.line;

        return startLine === endLine;
    }

    /**
     * Check to see if the first element inside an array is an object and on the same line as the node
     * If the node is not an array then it will return false.
     * @param {ASTNode} node node to check
     * @returns {boolean} success/failure
     */
    function isFirstArrayElementOnSameLine(node) {
        if (node.type === "ArrayExpression" && node.elements[0]) {
            return node.elements[0].loc.start.line === node.loc.start.line && node.elements[0].type === "ObjectExpression";
        } else {
            return false;
        }
    }

    /**
     * Check indent for array block content or object block content
     * @param {ASTNode} node node to examine
     * @returns {void}
     */
    function checkIndentInArrayOrObjectBlock(node) {

        // Skip inline
        if (isSingleLineNode(node)) {
            return;
        }

        var elements = (node.type === "ArrayExpression") ? node.elements : node.properties;

        // filter out empty elements example would be [ , 2] so remove first element as espree considers it as null
        elements = elements.filter(function(elem) {
            return elem !== null;
        });

        // Skip if first element is in same line with this node
        if (elements.length > 0 && elements[0].loc.start.line === node.loc.start.line) {
            return;
        }

        var nodeIndent;
        var elementsIndent;
        var parentVarNode = getVariableDeclaratorNode(node);

        // TODO - come up with a better strategy in future
        if (isNodeFirstInLine(node)) {
            var parent = node.parent;
            var effectiveParent = parent;

            if (parent.type === "MemberExpression") {
                if (isNodeFirstInLine(parent)) {
                    effectiveParent = parent.parent.parent;
                } else {
                    effectiveParent = parent.parent;
                }
            }
            nodeIndent = getNodeIndent(effectiveParent);
            if (parentVarNode && parentVarNode.loc.start.line !== node.loc.start.line) {
                if (parent.type !== "VariableDeclarator" || parentVarNode === parentVarNode.parent.declarations[0]) {
                    if (parent.type === "VariableDeclarator" && parentVarNode.loc.start.line === effectiveParent.loc.start.line) {
                        nodeIndent = nodeIndent + (indentSize * options.VariableDeclarator[parentVarNode.parent.kind]);
                    } else if (
                        parent.type === "ObjectExpression" ||
                        parent.type === "ArrayExpression" ||
                        parent.type === "CallExpression" ||
                        parent.type === "ArrowFunctionExpression" ||
                        parent.type === "NewExpression"
                    ) {
                        nodeIndent = nodeIndent + indentSize;
                    }
                }
            } else if (!parentVarNode && !isFirstArrayElementOnSameLine(parent) && effectiveParent.type !== "MemberExpression" && effectiveParent.type !== "ExpressionStatement" && effectiveParent.type !== "AssignmentExpression" && effectiveParent.type !== "Property") {
                nodeIndent = nodeIndent + indentSize;
            }

            elementsIndent = nodeIndent + indentSize;

            checkFirstNodeLineIndent(node, nodeIndent);
        } else {
            nodeIndent = getNodeIndent(node);
            elementsIndent = nodeIndent + indentSize;
        }

        /*
         * Check if the node is a multiple variable declaration; if so, then
         * make sure indentation takes that into account.
         */
        if (isNodeInVarOnTop(node, parentVarNode)) {
            elementsIndent += indentSize * options.VariableDeclarator[parentVarNode.parent.kind];
        }

        // Comma can be placed before property name
        checkNodesIndent(elements, elementsIndent, true);

        if (elements.length > 0) {

            // Skip last block line check if last item in same line
            if (elements[elements.length - 1].loc.end.line === node.loc.end.line) {
                return;
            }
        }

        checkLastNodeLineIndent(node, elementsIndent - indentSize);
    }

    /**
     * Check if the node or node body is a BlockStatement or not
     * @param {ASTNode} node node to test
     * @returns {boolean} True if it or its body is a block statement
     */
    function isNodeBodyBlock(node) {
        return node.type === "BlockStatement" || node.type === "ClassBody" || (node.body && node.body.type === "BlockStatement") ||
            (node.consequent && node.consequent.type === "BlockStatement");
    }

    /**
     * Check indentation for blocks
     * @param {ASTNode} node node to check
     * @returns {void}
     */
    function blockIndentationCheck(node) {

        // Skip inline blocks
        if (isSingleLineNode(node)) {
            return;
        }

        if (node.parent && (
                node.parent.type === "FunctionExpression" ||
                node.parent.type === "FunctionDeclaration" ||
                node.parent.type === "ArrowFunctionExpression"
        )) {
            checkIndentInFunctionBlock(node);
            return;
        }

        var indent;
        var nodesToCheck = [];

        /*
         * For this statements we should check indent from statement beginning,
         * not from the beginning of the block.
         */
        var statementsWithProperties = [
            "IfStatement", "WhileStatement", "ForStatement", "ForInStatement", "ForOfStatement", "DoWhileStatement", "ClassDeclaration"
        ];

        if (node.parent && statementsWithProperties.indexOf(node.parent.type) !== -1 && isNodeBodyBlock(node)) {
            indent = getNodeIndent(node.parent);
        } else {
            indent = getNodeIndent(node);
        }

        if (node.type === "IfStatement" && node.consequent.type !== "BlockStatement") {
            nodesToCheck = [node.consequent];
        } else if (util.isArray(node.body)) {
            nodesToCheck = node.body;
        } else {
            nodesToCheck = [node.body];
        }

        if (nodesToCheck.length > 0) {
            checkNodesIndent(nodesToCheck, indent + indentSize);
        }

        if (node.type === "BlockStatement") {
            checkLastNodeLineIndent(node, indent);
        }
    }

    /**
     * Filter out the elements which are on the same line of each other or the node.
     * basically have only 1 elements from each line except the variable declaration line.
     * @param {ASTNode} node Variable declaration node
     * @returns {ASTNode[]} Filtered elements
     */
    function filterOutSameLineVars(node) {
        return node.declarations.reduce(function(finalCollection, elem) {
            var lastElem = finalCollection[finalCollection.length - 1];

            if ((elem.loc.start.line !== node.loc.start.line && !lastElem) ||
                (lastElem && lastElem.loc.start.line !== elem.loc.start.line)) {
                finalCollection.push(elem);
            }

            return finalCollection;
        }, []);
    }

    /**
     * Check indentation for variable declarations
     * @param {ASTNode} node node to examine
     * @returns {void}
     */
    function checkIndentInVariableDeclarations(node) {
        var elements = filterOutSameLineVars(node);
        var nodeIndent = getNodeIndent(node);
        var lastElement = elements[elements.length - 1];

        var elementsIndent = nodeIndent + indentSize * options.VariableDeclarator[node.kind];

        // Comma can be placed before declaration
        checkNodesIndent(elements, elementsIndent, true);

        // Only check the last line if there is any token after the last item
        if (sourceCode.getLastToken(node).loc.end.line <= lastElement.loc.end.line) {
            return;
        }

        var tokenBeforeLastElement = sourceCode.getTokenBefore(lastElement);

        if (tokenBeforeLastElement.value === ",") {

            // Special case for comma-first syntax where the semicolon is indented
            checkLastNodeLineIndent(node, getNodeIndent(tokenBeforeLastElement));
        } else {
            checkLastNodeLineIndent(node, elementsIndent - indentSize);
        }
    }

    /**
     * Check and decide whether to check for indentation for blockless nodes
     * Scenarios are for or while statements without braces around them
     * @param {ASTNode} node node to examine
     * @returns {void}
     */
    function blockLessNodes(node) {
        if (node.body.type !== "BlockStatement") {
            blockIndentationCheck(node);
        }
    }

    /**
     * Returns the expected indentation for the case statement
     * @param {ASTNode} node node to examine
     * @param {int} [switchIndent] indent for switch statement
     * @returns {int} indent size
     */
    function expectedCaseIndent(node, switchIndent) {
        var switchNode = (node.type === "SwitchStatement") ? node : node.parent;
        var caseIndent;

        if (caseIndentStore[switchNode.loc.start.line]) {
            return caseIndentStore[switchNode.loc.start.line];
        } else {
            if (typeof switchIndent === "undefined") {
                switchIndent = getNodeIndent(switchNode);
            }

            if (switchNode.cases.length > 0 && options.SwitchCase === 0) {
                caseIndent = switchIndent;
            } else {
                caseIndent = switchIndent + (indentSize * options.SwitchCase);
            }

            caseIndentStore[switchNode.loc.start.line] = caseIndent;
            return caseIndent;
        }
    }

    return {
        Program: function(node) {
            if (node.body.length > 0) {

                // Root nodes should have no indent
                checkNodesIndent(node.body, getNodeIndent(node));
            }
        },

        ClassBody: blockIndentationCheck,

        BlockStatement: blockIndentationCheck,

        WhileStatement: blockLessNodes,

        ForStatement: blockLessNodes,

        ForInStatement: blockLessNodes,

        ForOfStatement: blockLessNodes,

        DoWhileStatement: blockLessNodes,

        IfStatement: function(node) {
            if (node.consequent.type !== "BlockStatement" && node.consequent.loc.start.line > node.loc.start.line) {
                blockIndentationCheck(node);
            }
        },

        VariableDeclaration: function(node) {
            if (node.declarations[node.declarations.length - 1].loc.start.line > node.declarations[0].loc.start.line) {
                checkIndentInVariableDeclarations(node);
            }
        },

        ObjectExpression: function(node) {
            checkIndentInArrayOrObjectBlock(node);
        },

        ArrayExpression: function(node) {
            checkIndentInArrayOrObjectBlock(node);
        },

        SwitchStatement: function(node) {

            // Switch is not a 'BlockStatement'
            var switchIndent = getNodeIndent(node);
            var caseIndent = expectedCaseIndent(node, switchIndent);

            checkNodesIndent(node.cases, caseIndent);

            checkLastNodeLineIndent(node, switchIndent);
        },

        SwitchCase: function(node) {

            // Skip inline cases
            if (isSingleLineNode(node)) {
                return;
            }
            var caseIndent = expectedCaseIndent(node);

            checkNodesIndent(node.consequent, caseIndent + indentSize);
        }
    };

}

};

},{“lodash”:108,“util”:122}],174:[function(require,module,exports){ /**

* @fileoverview A rule to control the style of variable initializations.
* @author Colin Ihrig
*/

“use strict”;

//—————————————————————————— // Helpers //——————————————————————————

/**

* Checks whether or not a given node is a for loop.
* @param {ASTNode} block - A node to check.
* @returns {boolean} `true` when the node is a for loop.
*/

function isForLoop(block) {

return block.type === "ForInStatement" ||
block.type === "ForOfStatement" ||
block.type === "ForStatement";

}

/**

* Checks whether or not a given declarator node has its initializer.
* @param {ASTNode} node - A declarator node to check.
* @returns {boolean} `true` when the node has its initializer.
*/

function isInitialized(node) {

var declaration = node.parent;
var block = declaration.parent;

if (isForLoop(block)) {
    if (block.type === "ForStatement") {
        return block.init === declaration;
    }
    return block.left === declaration;
}
return Boolean(node.init);

}

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "require or disallow initialization in `var` declarations",
        category: "Variables",
        recommended: false
    },

    schema: {
        anyOf: [
            {
                type: "array",
                items: [
                    {
                        enum: ["always"]
                    }
                ],
                minItems: 0,
                maxItems: 1
            },
            {
                type: "array",
                items: [
                    {
                        enum: ["never"]
                    },
                    {
                        type: "object",
                        properties: {
                            ignoreForLoopInit: {
                                type: "boolean"
                            }
                        },
                        additionalProperties: false
                    }
                ],
                minItems: 0,
                maxItems: 2
            }
        ]
    }
},

create: function(context) {

    var MODE_ALWAYS = "always",
        MODE_NEVER = "never";

    var mode = context.options[0] || MODE_ALWAYS;
    var params = context.options[1] || {};

    //--------------------------------------------------------------------------
    // Public API
    //--------------------------------------------------------------------------

    return {
        "VariableDeclaration:exit": function(node) {

            var kind = node.kind,
                declarations = node.declarations;

            for (var i = 0; i < declarations.length; ++i) {
                var declaration = declarations[i],
                    id = declaration.id,
                    initialized = isInitialized(declaration),
                    isIgnoredForLoop = params.ignoreForLoopInit && isForLoop(node.parent);

                if (id.type !== "Identifier") {
                    continue;
                }

                if (mode === MODE_ALWAYS && !initialized) {
                    context.report(declaration, "Variable '" + id.name + "' should be initialized on declaration.");
                } else if (mode === MODE_NEVER && kind !== "const" && initialized && !isIgnoredForLoop) {
                    context.report(declaration, "Variable '" + id.name + "' should not be initialized on declaration.");
                }
            }
        }
    };
}

};

},{}],175:[function(require,module,exports){ /**

* @fileoverview A rule to ensure consistent quotes used in jsx syntax.
* @author Mathias Schreck <https://github.com/lo1tuma>
*/

“use strict”;

//—————————————————————————— // Requirements //——————————————————————————

var astUtils = require(“../ast-utils”);

//—————————————————————————— // Constants //——————————————————————————

var QUOTE_SETTINGS = {

"prefer-double": {
    quote: "\"",
    description: "singlequote",
    convert: function(str) {
        return str.replace(/'/g, "\"");
    }
},
"prefer-single": {
    quote: "'",
    description: "doublequote",
    convert: function(str) {
        return str.replace(/"/g, "'");
    }
}

};

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "enforce the consistent use of either double or single quotes in JSX attributes",
        category: "Stylistic Issues",
        recommended: false
    },

    fixable: "whitespace",

    schema: [
        {
            enum: [ "prefer-single", "prefer-double" ]
        }
    ]
},

create: function(context) {
    var quoteOption = context.options[0] || "prefer-double",
        setting = QUOTE_SETTINGS[quoteOption];

    /**
     * Checks if the given string literal node uses the expected quotes
     * @param {ASTNode} node - A string literal node.
     * @returns {boolean} Whether or not the string literal used the expected quotes.
     * @public
     */
    function usesExpectedQuotes(node) {
        return node.value.indexOf(setting.quote) !== -1 || astUtils.isSurroundedBy(node.raw, setting.quote);
    }

    return {
        JSXAttribute: function(node) {
            var attributeValue = node.value;

            if (attributeValue && astUtils.isStringLiteral(attributeValue) && !usesExpectedQuotes(attributeValue)) {
                context.report({
                    node: attributeValue,
                    message: "Unexpected usage of " + setting.description + ".",
                    fix: function(fixer) {
                        return fixer.replaceText(attributeValue, setting.convert(attributeValue.raw));
                    }
                });
            }
        }
    };
}

};

},{“../ast-utils”:124}],176:[function(require,module,exports){ /**

* @fileoverview Rule to specify spacing of object literal keys and values
* @author Brandon Mills
*/

“use strict”;

//—————————————————————————— // Helpers //——————————————————————————

/**

* Checks whether a string contains a line terminator as defined in
* http://www.ecma-international.org/ecma-262/5.1/#sec-7.3
* @param {string} str String to test.
* @returns {boolean} True if str contains a line terminator.
*/

function containsLineTerminator(str) {

return /[\n\r\u2028\u2029]/.test(str);

}

/**

* Gets the last element of an array.
* @param {Array} arr An array.
* @returns {any} Last element of arr.
*/

function last(arr) {

return arr[arr.length - 1];

}

/**

* Checks whether a property is a member of the property group it follows.
* @param {ASTNode} lastMember The last Property known to be in the group.
* @param {ASTNode} candidate The next Property that might be in the group.
* @returns {boolean} True if the candidate property is part of the group.
*/

function continuesPropertyGroup(lastMember, candidate) {

var groupEndLine = lastMember.loc.start.line,
    candidateStartLine = candidate.loc.start.line,
    comments, i;

if (candidateStartLine - groupEndLine <= 1) {
    return true;
}

// Check that the first comment is adjacent to the end of the group, the
// last comment is adjacent to the candidate property, and that successive
// comments are adjacent to each other.
comments = candidate.leadingComments;
if (
    comments &&
    comments[0].loc.start.line - groupEndLine <= 1 &&
    candidateStartLine - last(comments).loc.end.line <= 1
) {
    for (i = 1; i < comments.length; i++) {
        if (comments[i].loc.start.line - comments[i - 1].loc.end.line > 1) {
            return false;
        }
    }
    return true;
}

return false;

}

/**

* Checks whether a node is contained on a single line.
* @param {ASTNode} node AST Node being evaluated.
* @returns {boolean} True if the node is a single line.
*/

function isSingleLine(node) {

return (node.loc.end.line === node.loc.start.line);

}

/** Sets option values from the configured options with defaults

* @param {Object} toOptions Object to be initialized
* @param {Object} fromOptions Object to be initialized from
* @returns {Object} The object with correctly initialized options and values
*/

function initOptions(toOptions, fromOptions) {

toOptions.mode = fromOptions.mode || "strict";

// Set align if exists -  multiLine case
if (typeof fromOptions.align !== "undefined") {
    toOptions.align = fromOptions.align;
}

// Set value of beforeColon
if (typeof fromOptions.beforeColon !== "undefined") {
    toOptions.beforeColon = +fromOptions.beforeColon;
} else {
    toOptions.beforeColon = 0;
}

// Set value of afterColon
if (typeof fromOptions.afterColon !== "undefined") {
    toOptions.afterColon = +fromOptions.afterColon;
} else {
    toOptions.afterColon = 1;
}

return toOptions;

}

//—————————————————————————— // Rule Definition //——————————————————————————

var messages = {

key: "{{error}} space after {{computed}}key '{{key}}'.",
value: "{{error}} space before value for {{computed}}key '{{key}}'."

};

module.exports = {

meta: {
    docs: {
        description: "enforce consistent spacing between keys and values in object literal properties",
        category: "Stylistic Issues",
        recommended: false
    },

    fixable: "whitespace",

    schema: [{
        anyOf: [
            {
                type: "object",
                properties: {
                    align: {
                        enum: ["colon", "value"]
                    },
                    mode: {
                        enum: ["strict", "minimum"]
                    },
                    beforeColon: {
                        type: "boolean"
                    },
                    afterColon: {
                        type: "boolean"
                    }
                },
                additionalProperties: false
            },
            {
                type: "object",
                properties: {
                    singleLine: {
                        type: "object",
                        properties: {
                            mode: {
                                enum: ["strict", "minimum"]
                            },
                            beforeColon: {
                                type: "boolean"
                            },
                            afterColon: {
                                type: "boolean"
                            }
                        },
                        additionalProperties: false
                    },
                    multiLine: {
                        type: "object",
                        properties: {
                            align: {
                                enum: ["colon", "value"]
                            },
                            mode: {
                                enum: ["strict", "minimum"]
                            },
                            beforeColon: {
                                type: "boolean"
                            },
                            afterColon: {
                                type: "boolean"
                            }
                        },
                        additionalProperties: false
                    }
                },
                additionalProperties: false
            }
        ]
    }]
},

create: function(context) {

    /**
     * OPTIONS
     * "key-spacing": [2, {
     *     beforeColon: false,
     *     afterColon: true,
     *     align: "colon" // Optional, or "value"
     * }
     */

    var options = context.options[0] || {},
        multiLineOptions = initOptions({}, (options.multiLine || options)),
        singleLineOptions = initOptions({}, (options.singleLine || options));

    var sourceCode = context.getSourceCode();

    /**
     * Determines if the given property is key-value property.
     * @param {ASTNode} property Property node to check.
     * @returns {Boolean} Whether the property is a key-value property.
     */
    function isKeyValueProperty(property) {
        return !(
            (property.method ||
            property.shorthand ||
            property.kind !== "init" || property.type !== "Property") // Could be "ExperimentalSpreadProperty" or "SpreadProperty"
        );
    }

    /**
     * Starting from the given a node (a property.key node here) looks forward
     * until it finds the last token before a colon punctuator and returns it.
     * @param {ASTNode} node The node to start looking from.
     * @returns {ASTNode} The last token before a colon punctuator.
     */
    function getLastTokenBeforeColon(node) {
        var prevNode;

        while (node && (node.type !== "Punctuator" || node.value !== ":")) {
            prevNode = node;
            node = sourceCode.getTokenAfter(node);
        }

        return prevNode;
    }

    /**
     * Starting from the given a node (a property.key node here) looks forward
     * until it finds the colon punctuator and returns it.
     * @param {ASTNode} node The node to start looking from.
     * @returns {ASTNode} The colon punctuator.
     */
    function getNextColon(node) {

        while (node && (node.type !== "Punctuator" || node.value !== ":")) {
            node = sourceCode.getTokenAfter(node);
        }

        return node;
    }

    /**
     * Gets an object literal property's key as the identifier name or string value.
     * @param {ASTNode} property Property node whose key to retrieve.
     * @returns {string} The property's key.
     */
    function getKey(property) {
        var key = property.key;

        if (property.computed) {
            return sourceCode.getText().slice(key.range[0], key.range[1]);
        }

        return property.key.name || property.key.value;
    }

    /**
     * Reports an appropriately-formatted error if spacing is incorrect on one
     * side of the colon.
     * @param {ASTNode} property Key-value pair in an object literal.
     * @param {string} side Side being verified - either "key" or "value".
     * @param {string} whitespace Actual whitespace string.
     * @param {int} expected Expected whitespace length.
     * @param {string} mode Value of the mode as "strict" or "minimum"
     * @returns {void}
     */
    function report(property, side, whitespace, expected, mode) {
        var diff = whitespace.length - expected,
            nextColon = getNextColon(property.key),
            tokenBeforeColon = sourceCode.getTokenBefore(nextColon),
            tokenAfterColon = sourceCode.getTokenAfter(nextColon),
            isKeySide = side === "key",
            locStart = isKeySide ? tokenBeforeColon.loc.start : tokenAfterColon.loc.start,
            isExtra = diff > 0,
            diffAbs = Math.abs(diff),
            spaces = Array(diffAbs + 1).join(" "),
            fix,
            range;

        if ((
            diff && mode === "strict" ||
            diff < 0 && mode === "minimum" ||
            diff > 0 && !expected && mode === "minimum") &&
            !(expected && containsLineTerminator(whitespace))
        ) {
            if (isExtra) {

                // Remove whitespace
                if (isKeySide) {
                    range = [tokenBeforeColon.end, tokenBeforeColon.end + diffAbs];
                } else {
                    range = [tokenAfterColon.start - diffAbs, tokenAfterColon.start];
                }
                fix = function(fixer) {
                    return fixer.removeRange(range);
                };
            } else {

                // Add whitespace
                if (isKeySide) {
                    fix = function(fixer) {
                        return fixer.insertTextAfter(tokenBeforeColon, spaces);
                    };
                } else {
                    fix = function(fixer) {
                        return fixer.insertTextBefore(tokenAfterColon, spaces);
                    };
                }
            }

            context.report({
                node: property[side],
                loc: locStart,
                message: messages[side],
                data: {
                    error: isExtra ? "Extra" : "Missing",
                    computed: property.computed ? "computed " : "",
                    key: getKey(property)
                },
                fix: fix
            });
        }
    }

    /**
     * Gets the number of characters in a key, including quotes around string
     * keys and braces around computed property keys.
     * @param {ASTNode} property Property of on object literal.
     * @returns {int} Width of the key.
     */
    function getKeyWidth(property) {
        var startToken, endToken;

        startToken = sourceCode.getFirstToken(property);
        endToken = getLastTokenBeforeColon(property.key);

        return endToken.range[1] - startToken.range[0];
    }

    /**
     * Gets the whitespace around the colon in an object literal property.
     * @param {ASTNode} property Property node from an object literal.
     * @returns {Object} Whitespace before and after the property's colon.
     */
    function getPropertyWhitespace(property) {
        var whitespace = /(\s*):(\s*)/.exec(sourceCode.getText().slice(
            property.key.range[1], property.value.range[0]
        ));

        if (whitespace) {
            return {
                beforeColon: whitespace[1],
                afterColon: whitespace[2]
            };
        }
        return null;
    }

    /**
     * Creates groups of properties.
     * @param  {ASTNode} node ObjectExpression node being evaluated.
     * @returns {Array.<ASTNode[]>} Groups of property AST node lists.
     */
    function createGroups(node) {
        if (node.properties.length === 1) {
            return [node.properties];
        }

        return node.properties.reduce(function(groups, property) {
            var currentGroup = last(groups),
                prev = last(currentGroup);

            if (!prev || continuesPropertyGroup(prev, property)) {
                currentGroup.push(property);
            } else {
                groups.push([property]);
            }

            return groups;
        }, [
            []
        ]);
    }

    /**
     * Verifies correct vertical alignment of a group of properties.
     * @param {ASTNode[]} properties List of Property AST nodes.
     * @returns {void}
     */
    function verifyGroupAlignment(properties) {
        var length = properties.length,
            widths = properties.map(getKeyWidth), // Width of keys, including quotes
            targetWidth = Math.max.apply(null, widths),
            i, property, whitespace, width,
            align = multiLineOptions.align,
            beforeColon = multiLineOptions.beforeColon,
            afterColon = multiLineOptions.afterColon,
            mode = multiLineOptions.mode;

        // Conditionally include one space before or after colon
        targetWidth += (align === "colon" ? beforeColon : afterColon);

        for (i = 0; i < length; i++) {
            property = properties[i];
            whitespace = getPropertyWhitespace(property);
            if (whitespace) { // Object literal getters/setters lack a colon
                width = widths[i];

                if (align === "value") {
                    report(property, "key", whitespace.beforeColon, beforeColon, mode);
                    report(property, "value", whitespace.afterColon, targetWidth - width, mode);
                } else { // align = "colon"
                    report(property, "key", whitespace.beforeColon, targetWidth - width, mode);
                    report(property, "value", whitespace.afterColon, afterColon, mode);
                }
            }
        }
    }

    /**
     * Verifies vertical alignment, taking into account groups of properties.
     * @param  {ASTNode} node ObjectExpression node being evaluated.
     * @returns {void}
     */
    function verifyAlignment(node) {
        createGroups(node).forEach(function(group) {
            verifyGroupAlignment(group.filter(isKeyValueProperty));
        });
    }

    /**
     * Verifies spacing of property conforms to specified options.
     * @param  {ASTNode} node Property node being evaluated.
     * @param {Object} lineOptions Configured singleLine or multiLine options
     * @returns {void}
     */
    function verifySpacing(node, lineOptions) {
        var actual = getPropertyWhitespace(node);

        if (actual) { // Object literal getters/setters lack colons
            report(node, "key", actual.beforeColon, lineOptions.beforeColon, lineOptions.mode);
            report(node, "value", actual.afterColon, lineOptions.afterColon, lineOptions.mode);
        }
    }

    /**
     * Verifies spacing of each property in a list.
     * @param  {ASTNode[]} properties List of Property AST nodes.
     * @returns {void}
     */
    function verifyListSpacing(properties) {
        var length = properties.length;

        for (var i = 0; i < length; i++) {
            verifySpacing(properties[i], singleLineOptions);
        }
    }

    //--------------------------------------------------------------------------
    // Public API
    //--------------------------------------------------------------------------

    if (multiLineOptions.align) { // Verify vertical alignment

        return {
            ObjectExpression: function(node) {
                if (isSingleLine(node)) {
                    verifyListSpacing(node.properties.filter(isKeyValueProperty));
                } else {
                    verifyAlignment(node);
                }
            }
        };

    } else { // Obey beforeColon and afterColon in each property as configured

        return {
            Property: function(node) {
                verifySpacing(node, isSingleLine(node.parent) ? singleLineOptions : multiLineOptions);
            }
        };

    }

}

};

},{}],177:[function(require,module,exports){ /**

* @fileoverview Rule to enforce spacing before and after keywords.
* @author Toru Nagashima
*/

“use strict”;

//—————————————————————————— // Requirements //——————————————————————————

var astUtils = require(“../ast-utils”),

keywords = require("../util/keywords");

//—————————————————————————— // Constants //——————————————————————————

var PREV_TOKEN = /^[)]}>]$/; var NEXT_TOKEN = /^(?:[([{<~!]|++?|–?)$/; var PREV_TOKEN_M = /^[)]}>*]$/; var NEXT_TOKEN_M = /^[{*]$/; var TEMPLATE_OPEN_PAREN = /${$/; var TEMPLATE_CLOSE_PAREN = /^}/; var CHECK_TYPE = /^(?:JSXElement|RegularExpression|String|Template)$/; var KEYS = keywords.concat([“as”, “await”, “from”, “get”, “let”, “of”, “set”, “yield”]);

// check duplications. (function() {

KEYS.sort();
for (var i = 1; i < KEYS.length; ++i) {
    if (KEYS[i] === KEYS[i - 1]) {
        throw new Error("Duplication was found in the keyword list: " + KEYS[i]);
    }
}

}());

//—————————————————————————— // Helpers //——————————————————————————

/**

* Checks whether or not a given token is a "Template" token ends with "${".
*
* @param {Token} token - A token to check.
* @returns {boolean} `true` if the token is a "Template" token ends with "${".
*/

function isOpenParenOfTemplate(token) {

return token.type === "Template" && TEMPLATE_OPEN_PAREN.test(token.value);

}

/**

* Checks whether or not a given token is a "Template" token starts with "}".
*
* @param {Token} token - A token to check.
* @returns {boolean} `true` if the token is a "Template" token starts with "}".
*/

function isCloseParenOfTemplate(token) {

return token.type === "Template" && TEMPLATE_CLOSE_PAREN.test(token.value);

}

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "enforce consistent spacing before and after keywords",
        category: "Stylistic Issues",
        recommended: false
    },

    fixable: "whitespace",

    schema: [
        {
            type: "object",
            properties: {
                before: {type: "boolean"},
                after: {type: "boolean"},
                overrides: {
                    type: "object",
                    properties: KEYS.reduce(function(retv, key) {
                        retv[key] = {
                            type: "object",
                            properties: {
                                before: {type: "boolean"},
                                after: {type: "boolean"}
                            },
                            additionalProperties: false
                        };
                        return retv;
                    }, {}),
                    additionalProperties: false
                }
            },
            additionalProperties: false
        }
    ]
},

create: function(context) {
    var sourceCode = context.getSourceCode();

    /**
     * Reports a given token if there are not space(s) before the token.
     *
     * @param {Token} token - A token to report.
     * @param {RegExp|undefined} pattern - Optional. A pattern of the previous
     *      token to check.
     * @returns {void}
     */
    function expectSpaceBefore(token, pattern) {
        pattern = pattern || PREV_TOKEN;

        var prevToken = sourceCode.getTokenBefore(token);

        if (prevToken &&
            (CHECK_TYPE.test(prevToken.type) || pattern.test(prevToken.value)) &&
            !isOpenParenOfTemplate(prevToken) &&
            astUtils.isTokenOnSameLine(prevToken, token) &&
            !sourceCode.isSpaceBetweenTokens(prevToken, token)
        ) {
            context.report({
                loc: token.loc.start,
                message: "Expected space(s) before \"{{value}}\".",
                data: token,
                fix: function(fixer) {
                    return fixer.insertTextBefore(token, " ");
                }
            });
        }
    }

    /**
     * Reports a given token if there are space(s) before the token.
     *
     * @param {Token} token - A token to report.
     * @param {RegExp|undefined} pattern - Optional. A pattern of the previous
     *      token to check.
     * @returns {void}
     */
    function unexpectSpaceBefore(token, pattern) {
        pattern = pattern || PREV_TOKEN;

        var prevToken = sourceCode.getTokenBefore(token);

        if (prevToken &&
            (CHECK_TYPE.test(prevToken.type) || pattern.test(prevToken.value)) &&
            !isOpenParenOfTemplate(prevToken) &&
            astUtils.isTokenOnSameLine(prevToken, token) &&
            sourceCode.isSpaceBetweenTokens(prevToken, token)
        ) {
            context.report({
                loc: token.loc.start,
                message: "Unexpected space(s) before \"{{value}}\".",
                data: token,
                fix: function(fixer) {
                    return fixer.removeRange([prevToken.range[1], token.range[0]]);
                }
            });
        }
    }

    /**
     * Reports a given token if there are not space(s) after the token.
     *
     * @param {Token} token - A token to report.
     * @param {RegExp|undefined} pattern - Optional. A pattern of the next
     *      token to check.
     * @returns {void}
     */
    function expectSpaceAfter(token, pattern) {
        pattern = pattern || NEXT_TOKEN;

        var nextToken = sourceCode.getTokenAfter(token);

        if (nextToken &&
            (CHECK_TYPE.test(nextToken.type) || pattern.test(nextToken.value)) &&
            !isCloseParenOfTemplate(nextToken) &&
            astUtils.isTokenOnSameLine(token, nextToken) &&
            !sourceCode.isSpaceBetweenTokens(token, nextToken)
        ) {
            context.report({
                loc: token.loc.start,
                message: "Expected space(s) after \"{{value}}\".",
                data: token,
                fix: function(fixer) {
                    return fixer.insertTextAfter(token, " ");
                }
            });
        }
    }

    /**
     * Reports a given token if there are space(s) after the token.
     *
     * @param {Token} token - A token to report.
     * @param {RegExp|undefined} pattern - Optional. A pattern of the next
     *      token to check.
     * @returns {void}
     */
    function unexpectSpaceAfter(token, pattern) {
        pattern = pattern || NEXT_TOKEN;

        var nextToken = sourceCode.getTokenAfter(token);

        if (nextToken &&
            (CHECK_TYPE.test(nextToken.type) || pattern.test(nextToken.value)) &&
            !isCloseParenOfTemplate(nextToken) &&
            astUtils.isTokenOnSameLine(token, nextToken) &&
            sourceCode.isSpaceBetweenTokens(token, nextToken)
        ) {
            context.report({
                loc: token.loc.start,
                message: "Unexpected space(s) after \"{{value}}\".",
                data: token,
                fix: function(fixer) {
                    return fixer.removeRange([token.range[1], nextToken.range[0]]);
                }
            });
        }
    }

    /**
     * Parses the option object and determines check methods for each keyword.
     *
     * @param {object|undefined} options - The option object to parse.
     * @returns {object} - Normalized option object.
     *      Keys are keywords (there are for every keyword).
     *      Values are instances of `{"before": function, "after": function}`.
     */
    function parseOptions(options) {
        var before = !options || options.before !== false;
        var after = !options || options.after !== false;
        var defaultValue = {
            before: before ? expectSpaceBefore : unexpectSpaceBefore,
            after: after ? expectSpaceAfter : unexpectSpaceAfter
        };
        var overrides = (options && options.overrides) || {};
        var retv = Object.create(null);

        for (var i = 0; i < KEYS.length; ++i) {
            var key = KEYS[i];
            var override = overrides[key];

            if (override) {
                var thisBefore = ("before" in override) ? override.before : before;
                var thisAfter = ("after" in override) ? override.after : after;

                retv[key] = {
                    before: thisBefore ? expectSpaceBefore : unexpectSpaceBefore,
                    after: thisAfter ? expectSpaceAfter : unexpectSpaceAfter
                };
            } else {
                retv[key] = defaultValue;
            }
        }

        return retv;
    }

    var checkMethodMap = parseOptions(context.options[0]);

    /**
     * Reports a given token if usage of spacing followed by the token is
     * invalid.
     *
     * @param {Token} token - A token to report.
     * @param {RegExp|undefined} pattern - Optional. A pattern of the previous
     *      token to check.
     * @returns {void}
     */
    function checkSpacingBefore(token, pattern) {
        checkMethodMap[token.value].before(token, pattern);
    }

    /**
     * Reports a given token if usage of spacing preceded by the token is
     * invalid.
     *
     * @param {Token} token - A token to report.
     * @param {RegExp|undefined} pattern - Optional. A pattern of the next
     *      token to check.
     * @returns {void}
     */
    function checkSpacingAfter(token, pattern) {
        checkMethodMap[token.value].after(token, pattern);
    }

    /**
     * Reports a given token if usage of spacing around the token is invalid.
     *
     * @param {Token} token - A token to report.
     * @returns {void}
     */
    function checkSpacingAround(token) {
        checkSpacingBefore(token);
        checkSpacingAfter(token);
    }

    /**
     * Reports the first token of a given node if the first token is a keyword
     * and usage of spacing around the token is invalid.
     *
     * @param {ASTNode|null} node - A node to report.
     * @returns {void}
     */
    function checkSpacingAroundFirstToken(node) {
        var firstToken = node && sourceCode.getFirstToken(node);

        if (firstToken && firstToken.type === "Keyword") {
            checkSpacingAround(firstToken);
        }
    }

    /**
     * Reports the first token of a given node if the first token is a keyword
     * and usage of spacing followed by the token is invalid.
     *
     * This is used for unary operators (e.g. `typeof`), `function`, and `super`.
     * Other rules are handling usage of spacing preceded by those keywords.
     *
     * @param {ASTNode|null} node - A node to report.
     * @returns {void}
     */
    function checkSpacingBeforeFirstToken(node) {
        var firstToken = node && sourceCode.getFirstToken(node);

        if (firstToken && firstToken.type === "Keyword") {
            checkSpacingBefore(firstToken);
        }
    }

    /**
     * Reports the previous token of a given node if the token is a keyword and
     * usage of spacing around the token is invalid.
     *
     * @param {ASTNode|null} node - A node to report.
     * @returns {void}
     */
    function checkSpacingAroundTokenBefore(node) {
        if (node) {
            var token = sourceCode.getTokenBefore(node);

            while (token.type !== "Keyword") {
                token = sourceCode.getTokenBefore(token);
            }

            checkSpacingAround(token);
        }
    }

    /**
     * Reports `class` and `extends` keywords of a given node if usage of
     * spacing around those keywords is invalid.
     *
     * @param {ASTNode} node - A node to report.
     * @returns {void}
     */
    function checkSpacingForClass(node) {
        checkSpacingAroundFirstToken(node);
        checkSpacingAroundTokenBefore(node.superClass);
    }

    /**
     * Reports `if` and `else` keywords of a given node if usage of spacing
     * around those keywords is invalid.
     *
     * @param {ASTNode} node - A node to report.
     * @returns {void}
     */
    function checkSpacingForIfStatement(node) {
        checkSpacingAroundFirstToken(node);
        checkSpacingAroundTokenBefore(node.alternate);
    }

    /**
     * Reports `try`, `catch`, and `finally` keywords of a given node if usage
     * of spacing around those keywords is invalid.
     *
     * @param {ASTNode} node - A node to report.
     * @returns {void}
     */
    function checkSpacingForTryStatement(node) {
        checkSpacingAroundFirstToken(node);
        checkSpacingAroundFirstToken(node.handler);
        checkSpacingAroundTokenBefore(node.finalizer);
    }

    /**
     * Reports `do` and `while` keywords of a given node if usage of spacing
     * around those keywords is invalid.
     *
     * @param {ASTNode} node - A node to report.
     * @returns {void}
     */
    function checkSpacingForDoWhileStatement(node) {
        checkSpacingAroundFirstToken(node);
        checkSpacingAroundTokenBefore(node.test);
    }

    /**
     * Reports `for` and `in` keywords of a given node if usage of spacing
     * around those keywords is invalid.
     *
     * @param {ASTNode} node - A node to report.
     * @returns {void}
     */
    function checkSpacingForForInStatement(node) {
        checkSpacingAroundFirstToken(node);
        checkSpacingAroundTokenBefore(node.right);
    }

    /**
     * Reports `for` and `of` keywords of a given node if usage of spacing
     * around those keywords is invalid.
     *
     * @param {ASTNode} node - A node to report.
     * @returns {void}
     */
    function checkSpacingForForOfStatement(node) {
        checkSpacingAroundFirstToken(node);

        // `of` is not a keyword token.
        var token = sourceCode.getTokenBefore(node.right);

        while (token.value !== "of") {
            token = sourceCode.getTokenBefore(token);
        }
        checkSpacingAround(token);
    }

    /**
     * Reports `import`, `export`, `as`, and `from` keywords of a given node if
     * usage of spacing around those keywords is invalid.
     *
     * This rule handles the `*` token in module declarations.
     *
     *     import*as A from "./a"; /*error Expected space(s) after "import".
     *                               error Expected space(s) before "as".
     *
     * @param {ASTNode} node - A node to report.
     * @returns {void}
     */
    function checkSpacingForModuleDeclaration(node) {
        var firstToken = sourceCode.getFirstToken(node);

        checkSpacingBefore(firstToken, PREV_TOKEN_M);
        checkSpacingAfter(firstToken, NEXT_TOKEN_M);

        if (node.source) {
            var fromToken = sourceCode.getTokenBefore(node.source);

            checkSpacingBefore(fromToken, PREV_TOKEN_M);
            checkSpacingAfter(fromToken, NEXT_TOKEN_M);
        }
    }

    /**
     * Reports `as` keyword of a given node if usage of spacing around this
     * keyword is invalid.
     *
     * @param {ASTNode} node - A node to report.
     * @returns {void}
     */
    function checkSpacingForImportNamespaceSpecifier(node) {
        var asToken = sourceCode.getFirstToken(node, 1);

        checkSpacingBefore(asToken, PREV_TOKEN_M);
    }

    /**
     * Reports `static`, `get`, and `set` keywords of a given node if usage of
     * spacing around those keywords is invalid.
     *
     * @param {ASTNode} node - A node to report.
     * @returns {void}
     */
    function checkSpacingForProperty(node) {
        if (node.static) {
            checkSpacingAroundFirstToken(node);
        }
        if (node.kind === "get" || node.kind === "set") {
            var token = sourceCode.getFirstToken(
                node,
                node.static ? 1 : 0
            );

            checkSpacingAround(token);
        }
    }

    return {

        // Statements
        DebuggerStatement: checkSpacingAroundFirstToken,
        WithStatement: checkSpacingAroundFirstToken,

        // Statements - Control flow
        BreakStatement: checkSpacingAroundFirstToken,
        ContinueStatement: checkSpacingAroundFirstToken,
        ReturnStatement: checkSpacingAroundFirstToken,
        ThrowStatement: checkSpacingAroundFirstToken,
        TryStatement: checkSpacingForTryStatement,

        // Statements - Choice
        IfStatement: checkSpacingForIfStatement,
        SwitchStatement: checkSpacingAroundFirstToken,
        SwitchCase: checkSpacingAroundFirstToken,

        // Statements - Loops
        DoWhileStatement: checkSpacingForDoWhileStatement,
        ForInStatement: checkSpacingForForInStatement,
        ForOfStatement: checkSpacingForForOfStatement,
        ForStatement: checkSpacingAroundFirstToken,
        WhileStatement: checkSpacingAroundFirstToken,

        // Statements - Declarations
        ClassDeclaration: checkSpacingForClass,
        ExportNamedDeclaration: checkSpacingForModuleDeclaration,
        ExportDefaultDeclaration: checkSpacingAroundFirstToken,
        ExportAllDeclaration: checkSpacingForModuleDeclaration,
        FunctionDeclaration: checkSpacingBeforeFirstToken,
        ImportDeclaration: checkSpacingForModuleDeclaration,
        VariableDeclaration: checkSpacingAroundFirstToken,

        // Expressions
        ClassExpression: checkSpacingForClass,
        FunctionExpression: checkSpacingBeforeFirstToken,
        NewExpression: checkSpacingBeforeFirstToken,
        Super: checkSpacingBeforeFirstToken,
        ThisExpression: checkSpacingBeforeFirstToken,
        UnaryExpression: checkSpacingBeforeFirstToken,
        YieldExpression: checkSpacingBeforeFirstToken,

        // Others
        ImportNamespaceSpecifier: checkSpacingForImportNamespaceSpecifier,
        MethodDefinition: checkSpacingForProperty,
        Property: checkSpacingForProperty
    };
}

};

},{“../ast-utils”:124,“../util/keywords”:361}],178:[function(require,module,exports){ /**

* @fileoverview Rule to enforce a single linebreak style.
* @author Erik Mueller
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "enforce consistent linebreak style",
        category: "Stylistic Issues",
        recommended: false
    },

    fixable: "whitespace",

    schema: [
        {
            enum: ["unix", "windows"]
        }
    ]
},

create: function(context) {

    var EXPECTED_LF_MSG = "Expected linebreaks to be 'LF' but found 'CRLF'.",
        EXPECTED_CRLF_MSG = "Expected linebreaks to be 'CRLF' but found 'LF'.";

    var sourceCode = context.getSourceCode();

    //--------------------------------------------------------------------------
    // Helpers
    //--------------------------------------------------------------------------

    /**
     * Builds a fix function that replaces text at the specified range in the source text.
     * @param {int[]} range The range to replace
     * @param {string} text The text to insert.
     * @returns {function} Fixer function
     * @private
     */
    function createFix(range, text) {
        return function(fixer) {
            return fixer.replaceTextRange(range, text);
        };
    }

    //--------------------------------------------------------------------------
    // Public
    //--------------------------------------------------------------------------

    return {
        Program: function checkForlinebreakStyle(node) {
            var linebreakStyle = context.options[0] || "unix",
                expectedLF = linebreakStyle === "unix",
                expectedLFChars = expectedLF ? "\n" : "\r\n",
                source = sourceCode.getText(),
                pattern = /\r\n|\r|\n|\u2028|\u2029/g,
                match,
                index,
                range;

            var i = 0;

            while ((match = pattern.exec(source)) !== null) {
                i++;
                if (match[0] === expectedLFChars) {
                    continue;
                }

                index = match.index;
                range = [index, index + match[0].length];
                context.report({
                    node: node,
                    loc: {
                        line: i,
                        column: sourceCode.lines[i - 1].length
                    },
                    message: expectedLF ? EXPECTED_LF_MSG : EXPECTED_CRLF_MSG,
                    fix: createFix(range, expectedLFChars)
                });
            }
        }
    };
}

};

},{}],179:[function(require,module,exports){ /**

* @fileoverview Enforces empty lines around comments.
* @author Jamund Ferguson
*/

“use strict”;

//—————————————————————————— // Requirements //——————————————————————————

var lodash = require(“lodash”),

astUtils = require("../ast-utils");

//—————————————————————————— // Helpers //——————————————————————————

/**

* Return an array with with any line numbers that are empty.
* @param {Array} lines An array of each line of the file.
* @returns {Array} An array of line numbers.
*/

function getEmptyLineNums(lines) {

var emptyLines = lines.map(function(line, i) {
    return {
        code: line.trim(),
        num: i + 1
    };
}).filter(function(line) {
    return !line.code;
}).map(function(line) {
    return line.num;
});

return emptyLines;

}

/**

* Return an array with with any line numbers that contain comments.
* @param {Array} comments An array of comment nodes.
* @returns {Array} An array of line numbers.
*/

function getCommentLineNums(comments) {

var lines = [];

comments.forEach(function(token) {
    var start = token.loc.start.line;
    var end = token.loc.end.line;

    lines.push(start, end);
});
return lines;

}

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "require empty lines around comments",
        category: "Stylistic Issues",
        recommended: false
    },

    fixable: "whitespace",

    schema: [
        {
            type: "object",
            properties: {
                beforeBlockComment: {
                    type: "boolean"
                },
                afterBlockComment: {
                    type: "boolean"
                },
                beforeLineComment: {
                    type: "boolean"
                },
                afterLineComment: {
                    type: "boolean"
                },
                allowBlockStart: {
                    type: "boolean"
                },
                allowBlockEnd: {
                    type: "boolean"
                },
                allowObjectStart: {
                    type: "boolean"
                },
                allowObjectEnd: {
                    type: "boolean"
                },
                allowArrayStart: {
                    type: "boolean"
                },
                allowArrayEnd: {
                    type: "boolean"
                }
            },
            additionalProperties: false
        }
    ]
},

create: function(context) {

    var options = context.options[0] ? lodash.assign({}, context.options[0]) : {};

    options.beforeLineComment = options.beforeLineComment || false;
    options.afterLineComment = options.afterLineComment || false;
    options.beforeBlockComment = typeof options.beforeBlockComment !== "undefined" ? options.beforeBlockComment : true;
    options.afterBlockComment = options.afterBlockComment || false;
    options.allowBlockStart = options.allowBlockStart || false;
    options.allowBlockEnd = options.allowBlockEnd || false;

    var sourceCode = context.getSourceCode();

    var lines = sourceCode.lines,
        numLines = lines.length + 1,
        comments = sourceCode.getAllComments(),
        commentLines = getCommentLineNums(comments),
        emptyLines = getEmptyLineNums(lines),
        commentAndEmptyLines = commentLines.concat(emptyLines);

    /**
     * Returns whether or not a token is a comment node type
     * @param {Token} token The token to check
     * @returns {boolean} True if the token is a comment node
     */
    function isCommentNodeType(token) {
        return token && (token.type === "Block" || token.type === "Line");
    }

    /**
     * Returns whether or not comments are on lines starting with or ending with code
     * @param {ASTNode} node The comment node to check.
     * @returns {boolean} True if the comment is not alone.
     */
    function codeAroundComment(node) {
        var token;

        token = node;
        do {
            token = sourceCode.getTokenOrCommentBefore(token);
        } while (isCommentNodeType(token));

        if (token && astUtils.isTokenOnSameLine(token, node)) {
            return true;
        }

        token = node;
        do {
            token = sourceCode.getTokenOrCommentAfter(token);
        } while (isCommentNodeType(token));

        if (token && astUtils.isTokenOnSameLine(node, token)) {
            return true;
        }

        return false;
    }

    /**
     * Returns whether or not comments are inside a node type or not.
     * @param {ASTNode} node The Comment node.
     * @param {ASTNode} parent The Comment parent node.
     * @param {string} nodeType The parent type to check against.
     * @returns {boolean} True if the comment is inside nodeType.
     */
    function isCommentInsideNodeType(node, parent, nodeType) {
        return parent.type === nodeType ||
            (parent.body && parent.body.type === nodeType) ||
            (parent.consequent && parent.consequent.type === nodeType);
    }

    /**
     * Returns whether or not comments are at the parent start or not.
     * @param {ASTNode} node The Comment node.
     * @param {string} nodeType The parent type to check against.
     * @returns {boolean} True if the comment is at parent start.
     */
    function isCommentAtParentStart(node, nodeType) {
        var ancestors = context.getAncestors();
        var parent;

        if (ancestors.length) {
            parent = ancestors.pop();
        }

        return parent && isCommentInsideNodeType(node, parent, nodeType) &&
                node.loc.start.line - parent.loc.start.line === 1;
    }

    /**
     * Returns whether or not comments are at the parent end or not.
     * @param {ASTNode} node The Comment node.
     * @param {string} nodeType The parent type to check against.
     * @returns {boolean} True if the comment is at parent end.
     */
    function isCommentAtParentEnd(node, nodeType) {
        var ancestors = context.getAncestors();
        var parent;

        if (ancestors.length) {
            parent = ancestors.pop();
        }

        return parent && isCommentInsideNodeType(node, parent, nodeType) &&
                parent.loc.end.line - node.loc.end.line === 1;
    }

    /**
     * Returns whether or not comments are at the block start or not.
     * @param {ASTNode} node The Comment node.
     * @returns {boolean} True if the comment is at block start.
     */
    function isCommentAtBlockStart(node) {
        return isCommentAtParentStart(node, "ClassBody") || isCommentAtParentStart(node, "BlockStatement") || isCommentAtParentStart(node, "SwitchCase");
    }

    /**
     * Returns whether or not comments are at the block end or not.
     * @param {ASTNode} node The Comment node.
     * @returns {boolean} True if the comment is at block end.
     */
    function isCommentAtBlockEnd(node) {
        return isCommentAtParentEnd(node, "ClassBody") || isCommentAtParentEnd(node, "BlockStatement") || isCommentAtParentEnd(node, "SwitchCase") || isCommentAtParentEnd(node, "SwitchStatement");
    }

    /**
     * Returns whether or not comments are at the object start or not.
     * @param {ASTNode} node The Comment node.
     * @returns {boolean} True if the comment is at object start.
     */
    function isCommentAtObjectStart(node) {
        return isCommentAtParentStart(node, "ObjectExpression") || isCommentAtParentStart(node, "ObjectPattern");
    }

    /**
     * Returns whether or not comments are at the object end or not.
     * @param {ASTNode} node The Comment node.
     * @returns {boolean} True if the comment is at object end.
     */
    function isCommentAtObjectEnd(node) {
        return isCommentAtParentEnd(node, "ObjectExpression") || isCommentAtParentEnd(node, "ObjectPattern");
    }

    /**
     * Returns whether or not comments are at the array start or not.
     * @param {ASTNode} node The Comment node.
     * @returns {boolean} True if the comment is at array start.
     */
    function isCommentAtArrayStart(node) {
        return isCommentAtParentStart(node, "ArrayExpression") || isCommentAtParentStart(node, "ArrayPattern");
    }

    /**
     * Returns whether or not comments are at the array end or not.
     * @param {ASTNode} node The Comment node.
     * @returns {boolean} True if the comment is at array end.
     */
    function isCommentAtArrayEnd(node) {
        return isCommentAtParentEnd(node, "ArrayExpression") || isCommentAtParentEnd(node, "ArrayPattern");
    }

    /**
     * Checks if a comment node has lines around it (ignores inline comments)
     * @param {ASTNode} node The Comment node.
     * @param {Object} opts Options to determine the newline.
     * @param {Boolean} opts.after Should have a newline after this line.
     * @param {Boolean} opts.before Should have a newline before this line.
     * @returns {void}
     */
    function checkForEmptyLine(node, opts) {
        var after = opts.after,
            before = opts.before;

        var prevLineNum = node.loc.start.line - 1,
            nextLineNum = node.loc.end.line + 1,
            commentIsNotAlone = codeAroundComment(node);

        var blockStartAllowed = options.allowBlockStart && isCommentAtBlockStart(node),
            blockEndAllowed = options.allowBlockEnd && isCommentAtBlockEnd(node),
            objectStartAllowed = options.allowObjectStart && isCommentAtObjectStart(node),
            objectEndAllowed = options.allowObjectEnd && isCommentAtObjectEnd(node),
            arrayStartAllowed = options.allowArrayStart && isCommentAtArrayStart(node),
            arrayEndAllowed = options.allowArrayEnd && isCommentAtArrayEnd(node);

        var exceptionStartAllowed = blockStartAllowed || objectStartAllowed || arrayStartAllowed;
        var exceptionEndAllowed = blockEndAllowed || objectEndAllowed || arrayEndAllowed;

        // ignore top of the file and bottom of the file
        if (prevLineNum < 1) {
            before = false;
        }
        if (nextLineNum >= numLines) {
            after = false;
        }

        // we ignore all inline comments
        if (commentIsNotAlone) {
            return;
        }

        var previousTokenOrComment = sourceCode.getTokenOrCommentBefore(node);
        var nextTokenOrComment = sourceCode.getTokenOrCommentAfter(node);

        // check for newline before
        if (!exceptionStartAllowed && before && !lodash.includes(commentAndEmptyLines, prevLineNum) &&
                !(isCommentNodeType(previousTokenOrComment) && astUtils.isTokenOnSameLine(previousTokenOrComment, node))) {
            var lineStart = node.range[0] - node.loc.start.column;
            var range = [lineStart, lineStart];

            context.report({
                node: node,
                message: "Expected line before comment.",
                fix: function(fixer) {
                    return fixer.insertTextBeforeRange(range, "\n");
                }
            });
        }

        // check for newline after
        if (!exceptionEndAllowed && after && !lodash.includes(commentAndEmptyLines, nextLineNum) &&
                !(isCommentNodeType(nextTokenOrComment) && astUtils.isTokenOnSameLine(node, nextTokenOrComment))) {
            context.report({
                node: node,
                message: "Expected line after comment.",
                fix: function(fixer) {
                    return fixer.insertTextAfter(node, "\n");
                }
            });
        }

    }

    //--------------------------------------------------------------------------
    // Public
    //--------------------------------------------------------------------------

    return {

        LineComment: function(node) {
            if (options.beforeLineComment || options.afterLineComment) {
                checkForEmptyLine(node, {
                    after: options.afterLineComment,
                    before: options.beforeLineComment
                });
            }
        },

        BlockComment: function(node) {
            if (options.beforeBlockComment || options.afterBlockComment) {
                checkForEmptyLine(node, {
                    after: options.afterBlockComment,
                    before: options.beforeBlockComment
                });
            }
        }

    };
}

};

},{“../ast-utils”:124,“lodash”:108}],180:[function(require,module,exports){ /**

* @fileoverview A rule to set the maximum depth block can be nested in a function.
* @author Ian Christian Myers
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "enforce a maximum depth that blocks can be nested",
        category: "Stylistic Issues",
        recommended: false
    },

    schema: [
        {
            oneOf: [
                {
                    type: "integer",
                    minimum: 0
                },
                {
                    type: "object",
                    properties: {
                        maximum: {
                            type: "integer",
                            minimum: 0
                        },
                        max: {
                            type: "integer",
                            minimum: 0
                        }
                    },
                    additionalProperties: false
                }
            ]
        }
    ]
},

create: function(context) {

    //--------------------------------------------------------------------------
    // Helpers
    //--------------------------------------------------------------------------

    var functionStack = [],
        option = context.options[0],
        maxDepth = 4;

    if (typeof option === "object" && option.hasOwnProperty("maximum") && typeof option.maximum === "number") {
        maxDepth = option.maximum;
    }
    if (typeof option === "object" && option.hasOwnProperty("max") && typeof option.max === "number") {
        maxDepth = option.max;
    }
    if (typeof option === "number") {
        maxDepth = option;
    }

    /**
     * When parsing a new function, store it in our function stack
     * @returns {void}
     * @private
     */
    function startFunction() {
        functionStack.push(0);
    }

    /**
     * When parsing is done then pop out the reference
     * @returns {void}
     * @private
     */
    function endFunction() {
        functionStack.pop();
    }

    /**
     * Save the block and Evaluate the node
     * @param {ASTNode} node node to evaluate
     * @returns {void}
     * @private
     */
    function pushBlock(node) {
        var len = ++functionStack[functionStack.length - 1];

        if (len > maxDepth) {
            context.report(node, "Blocks are nested too deeply ({{depth}}).",
                    { depth: len });
        }
    }

    /**
     * Pop the saved block
     * @returns {void}
     * @private
     */
    function popBlock() {
        functionStack[functionStack.length - 1]--;
    }

    //--------------------------------------------------------------------------
    // Public API
    //--------------------------------------------------------------------------

    return {
        Program: startFunction,
        FunctionDeclaration: startFunction,
        FunctionExpression: startFunction,
        ArrowFunctionExpression: startFunction,

        IfStatement: function(node) {
            if (node.parent.type !== "IfStatement") {
                pushBlock(node);
            }
        },
        SwitchStatement: pushBlock,
        TryStatement: pushBlock,
        DoWhileStatement: pushBlock,
        WhileStatement: pushBlock,
        WithStatement: pushBlock,
        ForStatement: pushBlock,
        ForInStatement: pushBlock,
        ForOfStatement: pushBlock,

        "IfStatement:exit": popBlock,
        "SwitchStatement:exit": popBlock,
        "TryStatement:exit": popBlock,
        "DoWhileStatement:exit": popBlock,
        "WhileStatement:exit": popBlock,
        "WithStatement:exit": popBlock,
        "ForStatement:exit": popBlock,
        "ForInStatement:exit": popBlock,
        "ForOfStatement:exit": popBlock,

        "FunctionDeclaration:exit": endFunction,
        "FunctionExpression:exit": endFunction,
        "ArrowFunctionExpression:exit": endFunction,
        "Program:exit": endFunction
    };

}

};

},{}],181:[function(require,module,exports){ /**

* @fileoverview Rule to check for max length on a line.
* @author Matt DuVall <http://www.mattduvall.com>
*/

“use strict”;

//—————————————————————————— // Constants //——————————————————————————

var OPTIONS_SCHEMA = {

type: "object",
properties: {
    code: {
        type: "integer",
        minimum: 0
    },
    comments: {
        type: "integer",
        minimum: 0
    },
    tabWidth: {
        type: "integer",
        minimum: 0
    },
    ignorePattern: {
        type: "string"
    },
    ignoreComments: {
        type: "boolean"
    },
    ignoreUrls: {
        type: "boolean"
    },
    ignoreTrailingComments: {
        type: "boolean"
    }
},
additionalProperties: false

};

var OPTIONS_OR_INTEGER_SCHEMA = {

anyOf: [
    OPTIONS_SCHEMA,
    {
        type: "integer",
        minimum: 0
    }
]

};

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "enforce a maximum line length",
        category: "Stylistic Issues",
        recommended: false
    },

    schema: [
        OPTIONS_OR_INTEGER_SCHEMA,
        OPTIONS_OR_INTEGER_SCHEMA,
        OPTIONS_SCHEMA
    ]
},

create: function(context) {

    /*
     * Inspired by http://tools.ietf.org/html/rfc3986#appendix-B, however:
     * - They're matching an entire string that we know is a URI
     * - We're matching part of a string where we think there *might* be a URL
     * - We're only concerned about URLs, as picking out any URI would cause
     *   too many false positives
     * - We don't care about matching the entire URL, any small segment is fine
     */
    var URL_REGEXP = /[^:/?#]:\/\/[^?#]/;

    var sourceCode = context.getSourceCode();

    /**
     * Computes the length of a line that may contain tabs. The width of each
     * tab will be the number of spaces to the next tab stop.
     * @param {string} line The line.
     * @param {int} tabWidth The width of each tab stop in spaces.
     * @returns {int} The computed line length.
     * @private
     */
    function computeLineLength(line, tabWidth) {
        var extraCharacterCount = 0;

        line.replace(/\t/g, function(match, offset) {
            var totalOffset = offset + extraCharacterCount,
                previousTabStopOffset = tabWidth ? totalOffset % tabWidth : 0,
                spaceCount = tabWidth - previousTabStopOffset;

            extraCharacterCount += spaceCount - 1;  // -1 for the replaced tab
        });
        return line.length + extraCharacterCount;
    }

    // The options object must be the last option specified…
    var lastOption = context.options[context.options.length - 1];
    var options = typeof lastOption === "object" ? Object.create(lastOption) : {};

    // …but max code length…
    if (typeof context.options[0] === "number") {
        options.code = context.options[0];
    }

    // …and tabWidth can be optionally specified directly as integers.
    if (typeof context.options[1] === "number") {
        options.tabWidth = context.options[1];
    }

    var maxLength = options.code || 80,
        tabWidth = options.tabWidth || 4,
        ignorePattern = options.ignorePattern || null,
        ignoreComments = options.ignoreComments || false,
        ignoreTrailingComments = options.ignoreTrailingComments || options.ignoreComments || false,
        ignoreUrls = options.ignoreUrls || false,
        maxCommentLength = options.comments;

    if (ignorePattern) {
        ignorePattern = new RegExp(ignorePattern);
    }

    //--------------------------------------------------------------------------
    // Helpers
    //--------------------------------------------------------------------------

    /**
     * Tells if a given comment is trailing: it starts on the current line and
     * extends to or past the end of the current line.
     * @param {string} line The source line we want to check for a trailing comment on
     * @param {number} lineNumber The one-indexed line number for line
     * @param {ASTNode} comment The comment to inspect
     * @returns {boolean} If the comment is trailing on the given line
     */
    function isTrailingComment(line, lineNumber, comment) {
        return comment &&
            (comment.loc.start.line === lineNumber && lineNumber <= comment.loc.end.line) &&
            (comment.loc.end.line > lineNumber || comment.loc.end.column === line.length);
    }

    /**
     * Tells if a comment encompasses the entire line.
     * @param {string} line The source line with a trailing comment
     * @param {number} lineNumber The one-indexed line number this is on
     * @param {ASTNode} comment The comment to remove
     * @returns {boolean} If the comment covers the entire line
     */
    function isFullLineComment(line, lineNumber, comment) {
        var start = comment.loc.start,
            end = comment.loc.end,
            isFirstTokenOnLine = !line.slice(0, comment.loc.start.column).trim();

        return comment &&
            (start.line < lineNumber || (start.line === lineNumber && isFirstTokenOnLine)) &&
            (end.line > lineNumber || end.column === line.length);
    }

    /**
     * Gets the line after the comment and any remaining trailing whitespace is
     * stripped.
     * @param {string} line The source line with a trailing comment
     * @param {number} lineNumber The one-indexed line number this is on
     * @param {ASTNode} comment The comment to remove
     * @returns {string} Line without comment and trailing whitepace
     */
    function stripTrailingComment(line, lineNumber, comment) {

        // loc.column is zero-indexed
        return line.slice(0, comment.loc.start.column).replace(/\s+$/, "");
    }

    /**
     * Check the program for max length
     * @param {ASTNode} node Node to examine
     * @returns {void}
     * @private
     */
    function checkProgramForMaxLength(node) {

        // split (honors line-ending)
        var lines = sourceCode.lines,

            // list of comments to ignore
            comments = ignoreComments || maxCommentLength || ignoreTrailingComments ? sourceCode.getAllComments() : [],

            // we iterate over comments in parallel with the lines
            commentsIndex = 0;

        lines.forEach(function(line, i) {

            // i is zero-indexed, line numbers are one-indexed
            var lineNumber = i + 1;

            /*
             * if we're checking comment length; we need to know whether this
             * line is a comment
             */
            var lineIsComment = false;

            /*
             * We can short-circuit the comment checks if we're already out of
             * comments to check.
             */
            if (commentsIndex < comments.length) {

                // iterate over comments until we find one past the current line
                do {
                    var comment = comments[++commentsIndex];
                } while (comment && comment.loc.start.line <= lineNumber);

                // and step back by one
                comment = comments[--commentsIndex];

                if (isFullLineComment(line, lineNumber, comment)) {
                    lineIsComment = true;
                } else if (ignoreTrailingComments && isTrailingComment(line, lineNumber, comment)) {
                    line = stripTrailingComment(line, lineNumber, comment);
                }
            }
            if (ignorePattern && ignorePattern.test(line) ||
                ignoreUrls && URL_REGEXP.test(line)) {

                // ignore this line
                return;
            }

            var lineLength = computeLineLength(line, tabWidth);

            if (lineIsComment && ignoreComments) {
                return;
            }

            if (lineIsComment && lineLength > maxCommentLength) {
                context.report(node, { line: lineNumber, column: 0 }, "Line " + (i + 1) + " exceeds the maximum comment line length of " + maxCommentLength + ".");
            } else if (lineLength > maxLength) {
                context.report(node, { line: lineNumber, column: 0 }, "Line " + (i + 1) + " exceeds the maximum line length of " + maxLength + ".");
            }
        });
    }

    //--------------------------------------------------------------------------
    // Public API
    //--------------------------------------------------------------------------

    return {
        Program: checkProgramForMaxLength
    };

}

};

},{}],182:[function(require,module,exports){ /**

* @fileoverview enforce a maximum file length
* @author Alberto Rodríguez
*/

“use strict”;

//—————————————————————————— // Requirements //——————————————————————————

var lodash = require(“lodash”); var astUtils = require(“../ast-utils”);

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "enforce a maximum number of lines per file",
        category: "Stylistic Issues",
        recommended: false
    },

    schema: [
        {
            oneOf: [
                {
                    type: "integer",
                    minimum: 0
                },
                {
                    type: "object",
                    properties: {
                        max: {
                            type: "integer",
                            minimum: 0
                        },
                        skipComments: {
                            type: "boolean"
                        },
                        skipBlankLines: {
                            type: "boolean"
                        }
                    },
                    additionalProperties: false
                }
            ]
        }
    ]
},

create: function(context) {
    var option = context.options[0],
        max = 300;

    if (typeof option === "object" && option.hasOwnProperty("max") && typeof option.max === "number") {
        max = option.max;
    }

    if (typeof option === "number") {
        max = option;
    }

    var skipComments = option && option.skipComments;
    var skipBlankLines = option && option.skipBlankLines;

    var sourceCode = context.getSourceCode();

    /**
     * Returns whether or not a token is a comment node type
     * @param {Token} token The token to check
     * @returns {boolean} True if the token is a comment node
     */
    function isCommentNodeType(token) {
        return token && (token.type === "Block" || token.type === "Line");
    }

    /**
     * Returns the line numbers of a comment that don't have any code on the same line
     * @param {Node} comment The comment node to check
     * @returns {int[]} The line numbers
     */
    function getLinesWithoutCode(comment) {
        var start = comment.loc.start.line;
        var end = comment.loc.end.line;

        var token;

        token = comment;
        do {
            token = sourceCode.getTokenOrCommentBefore(token);
        } while (isCommentNodeType(token));

        if (token && astUtils.isTokenOnSameLine(token, comment)) {
            start += 1;
        }

        token = comment;
        do {
            token = sourceCode.getTokenOrCommentAfter(token);
        } while (isCommentNodeType(token));

        if (token && astUtils.isTokenOnSameLine(comment, token)) {
            end -= 1;
        }

        if (start <= end) {
            return lodash.range(start, end + 1);
        }
        return [];
    }

    return {
        "Program:exit": function() {
            var lines = sourceCode.lines.map(function(text, i) {
                return { lineNumber: i + 1, text: text };
            });

            if (skipBlankLines) {
                lines = lines.filter(function(l) {
                    return l.text.trim() !== "";
                });
            }

            if (skipComments) {
                var comments = sourceCode.getAllComments();

                var commentLines = lodash.flatten(comments.map(function(comment) {
                    return getLinesWithoutCode(comment);
                }));

                lines = lines.filter(function(l) {
                    return !lodash.includes(commentLines, l.lineNumber);
                });
            }

            if (lines.length > max) {
                context.report({
                    loc: { line: 1, column: 0 },
                    message: "File must be at most " + max + " lines long"
                });
            }
        }
    };
}

};

},{“../ast-utils”:124,“lodash”:108}],183:[function(require,module,exports){ /**

* @fileoverview Rule to enforce a maximum number of nested callbacks.
* @author Ian Christian Myers
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "enforce a maximum depth that callbacks can be nested",
        category: "Stylistic Issues",
        recommended: false
    },

    schema: [
        {
            oneOf: [
                {
                    type: "integer",
                    minimum: 0
                },
                {
                    type: "object",
                    properties: {
                        maximum: {
                            type: "integer",
                            minimum: 0
                        },
                        max: {
                            type: "integer",
                            minimum: 0
                        }
                    },
                    additionalProperties: false
                }
            ]
        }
    ]
},

create: function(context) {

    //--------------------------------------------------------------------------
    // Constants
    //--------------------------------------------------------------------------
    var option = context.options[0],
        THRESHOLD = 10;

    if (typeof option === "object" && option.hasOwnProperty("maximum") && typeof option.maximum === "number") {
        THRESHOLD = option.maximum;
    }
    if (typeof option === "object" && option.hasOwnProperty("max") && typeof option.max === "number") {
        THRESHOLD = option.max;
    }
    if (typeof option === "number") {
        THRESHOLD = option;
    }

    //--------------------------------------------------------------------------
    // Helpers
    //--------------------------------------------------------------------------

    var callbackStack = [];

    /**
     * Checks a given function node for too many callbacks.
     * @param {ASTNode} node The node to check.
     * @returns {void}
     * @private
     */
    function checkFunction(node) {
        var parent = node.parent;

        if (parent.type === "CallExpression") {
            callbackStack.push(node);
        }

        if (callbackStack.length > THRESHOLD) {
            var opts = {num: callbackStack.length, max: THRESHOLD};

            context.report(node, "Too many nested callbacks ({{num}}). Maximum allowed is {{max}}.", opts);
        }
    }

    /**
     * Pops the call stack.
     * @returns {void}
     * @private
     */
    function popStack() {
        callbackStack.pop();
    }

    //--------------------------------------------------------------------------
    // Public API
    //--------------------------------------------------------------------------

    return {
        ArrowFunctionExpression: checkFunction,
        "ArrowFunctionExpression:exit": popStack,

        FunctionExpression: checkFunction,
        "FunctionExpression:exit": popStack
    };

}

};

},{}],184:[function(require,module,exports){ /**

* @fileoverview Rule to flag when a function has too many parameters
* @author Ilya Volodin
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "enforce a maximum number of parameters in `function` definitions",
        category: "Stylistic Issues",
        recommended: false
    },

    schema: [
        {
            oneOf: [
                {
                    type: "integer",
                    minimum: 0
                },
                {
                    type: "object",
                    properties: {
                        maximum: {
                            type: "integer",
                            minimum: 0
                        },
                        max: {
                            type: "integer",
                            minimum: 0
                        }
                    },
                    additionalProperties: false
                }
            ]
        }
    ]
},

create: function(context) {

    var option = context.options[0],
        numParams = 3;

    if (typeof option === "object" && option.hasOwnProperty("maximum") && typeof option.maximum === "number") {
        numParams = option.maximum;
    }
    if (typeof option === "object" && option.hasOwnProperty("max") && typeof option.max === "number") {
        numParams = option.max;
    }
    if (typeof option === "number") {
        numParams = option;
    }

    /**
     * Checks a function to see if it has too many parameters.
     * @param {ASTNode} node The node to check.
     * @returns {void}
     * @private
     */
    function checkFunction(node) {
        if (node.params.length > numParams) {
            context.report(node, "This function has too many parameters ({{count}}). Maximum allowed is {{max}}.", {
                count: node.params.length,
                max: numParams
            });
        }
    }

    return {
        FunctionDeclaration: checkFunction,
        ArrowFunctionExpression: checkFunction,
        FunctionExpression: checkFunction
    };

}

};

},{}],185:[function(require,module,exports){ /**

* @fileoverview Specify the maximum number of statements allowed per line.
* @author Kenneth Williams
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "enforce a maximum number of statements allowed per line",
        category: "Stylistic Issues",
        recommended: false
    },

    schema: [
        {
            type: "object",
            properties: {
                max: {
                    type: "integer",
                    minimum: 0
                }
            },
            additionalProperties: false
        }
    ]
},

create: function(context) {

    var sourceCode = context.getSourceCode(),
        options = context.options[0] || {},
        lastStatementLine = 0,
        numberOfStatementsOnThisLine = 0,
        maxStatementsPerLine = typeof options.max !== "undefined" ? options.max : 1,
        message = "This line has too many statements. Maximum allowed is " + maxStatementsPerLine + ".";

    //--------------------------------------------------------------------------
    // Helpers
    //--------------------------------------------------------------------------

    var SINGLE_CHILD_ALLOWED = /^(?:(?:DoWhile|For|ForIn|ForOf|If|Labeled|While)Statement|Export(?:Default|Named)Declaration)$/;

    /**
     * Gets the actual last token of a given node.
     *
     * @param {ASTNode} node - A node to get. This is a node except EmptyStatement.
     * @returns {Token} The actual last token.
     */
    function getActualLastToken(node) {
        var lastToken = sourceCode.getLastToken(node);

        if (lastToken.value === ";") {
            lastToken = sourceCode.getTokenBefore(lastToken);
        }
        return lastToken;
    }

    /**
     * Addresses a given node.
     * It updates the state of this rule, then reports the node if the node violated this rule.
     *
     * @param {ASTNode} node - A node to check.
     * @returns {void}
     */
    function enterStatement(node) {
        var line = node.loc.start.line;

        // Skip to allow non-block statements if this is direct child of control statements.
        // `if (a) foo();` is counted as 1.
        // But `if (a) foo(); else foo();` should be counted as 2.
        if (SINGLE_CHILD_ALLOWED.test(node.parent.type) &&
            node.parent.alternate !== node
        ) {
            return;
        }

        // Update state.
        if (line === lastStatementLine) {
            numberOfStatementsOnThisLine += 1;
        } else {
            numberOfStatementsOnThisLine = 1;
            lastStatementLine = line;
        }

        // Reports if the node violated this rule.
        if (numberOfStatementsOnThisLine === maxStatementsPerLine + 1) {
            context.report({node: node, message: message});
        }
    }

    /**
     * Updates the state of this rule with the end line of leaving node to check with the next statement.
     *
     * @param {ASTNode} node - A node to check.
     * @returns {void}
     */
    function leaveStatement(node) {
        var line = getActualLastToken(node).loc.end.line;

        // Update state.
        if (line !== lastStatementLine) {
            numberOfStatementsOnThisLine = 1;
            lastStatementLine = line;
        }
    }

    //--------------------------------------------------------------------------
    // Public API
    //--------------------------------------------------------------------------

    return {
        BreakStatement: enterStatement,
        ClassDeclaration: enterStatement,
        ContinueStatement: enterStatement,
        DebuggerStatement: enterStatement,
        DoWhileStatement: enterStatement,
        ExpressionStatement: enterStatement,
        ForInStatement: enterStatement,
        ForOfStatement: enterStatement,
        ForStatement: enterStatement,
        FunctionDeclaration: enterStatement,
        IfStatement: enterStatement,
        ImportDeclaration: enterStatement,
        LabeledStatement: enterStatement,
        ReturnStatement: enterStatement,
        SwitchStatement: enterStatement,
        ThrowStatement: enterStatement,
        TryStatement: enterStatement,
        VariableDeclaration: enterStatement,
        WhileStatement: enterStatement,
        WithStatement: enterStatement,
        ExportNamedDeclaration: enterStatement,
        ExportDefaultDeclaration: enterStatement,
        ExportAllDeclaration: enterStatement,

        "BreakStatement:exit": leaveStatement,
        "ClassDeclaration:exit": leaveStatement,
        "ContinueStatement:exit": leaveStatement,
        "DebuggerStatement:exit": leaveStatement,
        "DoWhileStatement:exit": leaveStatement,
        "ExpressionStatement:exit": leaveStatement,
        "ForInStatement:exit": leaveStatement,
        "ForOfStatement:exit": leaveStatement,
        "ForStatement:exit": leaveStatement,
        "FunctionDeclaration:exit": leaveStatement,
        "IfStatement:exit": leaveStatement,
        "ImportDeclaration:exit": leaveStatement,
        "LabeledStatement:exit": leaveStatement,
        "ReturnStatement:exit": leaveStatement,
        "SwitchStatement:exit": leaveStatement,
        "ThrowStatement:exit": leaveStatement,
        "TryStatement:exit": leaveStatement,
        "VariableDeclaration:exit": leaveStatement,
        "WhileStatement:exit": leaveStatement,
        "WithStatement:exit": leaveStatement,
        "ExportNamedDeclaration:exit": leaveStatement,
        "ExportDefaultDeclaration:exit": leaveStatement,
        "ExportAllDeclaration:exit": leaveStatement,

        // For backward compatibility.
        // Empty blocks should be warned if `{max: 0}` was given.
        BlockStatement: function reportIfZero(node) {
            if (maxStatementsPerLine === 0 && node.body.length === 0) {
                context.report({node: node, message: message});
            }
        }
    };
}

};

},{}],186:[function(require,module,exports){ /**

* @fileoverview A rule to set the maximum number of statements in a function.
* @author Ian Christian Myers
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "enforce a maximum number of statements allowed in `function` blocks",
        category: "Stylistic Issues",
        recommended: false
    },

    schema: [
        {
            oneOf: [
                {
                    type: "integer",
                    minimum: 0
                },
                {
                    type: "object",
                    properties: {
                        maximum: {
                            type: "integer",
                            minimum: 0
                        },
                        max: {
                            type: "integer",
                            minimum: 0
                        }
                    },
                    additionalProperties: false
                }
            ]
        },
        {
            type: "object",
            properties: {
                ignoreTopLevelFunctions: {
                    type: "boolean"
                }
            },
            additionalProperties: false
        }
    ]
},

create: function(context) {

    //--------------------------------------------------------------------------
    // Helpers
    //--------------------------------------------------------------------------

    var functionStack = [],
        option = context.options[0],
        maxStatements = 10,
        ignoreTopLevelFunctions = context.options[1] && context.options[1].ignoreTopLevelFunctions || false,
        topLevelFunctions = [];

    if (typeof option === "object" && option.hasOwnProperty("maximum") && typeof option.maximum === "number") {
        maxStatements = option.maximum;
    }
    if (typeof option === "object" && option.hasOwnProperty("max") && typeof option.max === "number") {
        maxStatements = option.max;
    }
    if (typeof option === "number") {
        maxStatements = option;
    }

    /**
     * Reports a node if it has too many statements
     * @param {ASTNode} node node to evaluate
     * @param {int} count Number of statements in node
     * @param {int} max Maximum number of statements allowed
     * @returns {void}
     * @private
     */
    function reportIfTooManyStatements(node, count, max) {
        if (count > max) {
            context.report(
                node,
                "This function has too many statements ({{count}}). Maximum allowed is {{max}}.",
                { count: count, max: max });
        }
    }

    /**
     * When parsing a new function, store it in our function stack
     * @returns {void}
     * @private
     */
    function startFunction() {
        functionStack.push(0);
    }

    /**
     * Evaluate the node at the end of function
     * @param {ASTNode} node node to evaluate
     * @returns {void}
     * @private
     */
    function endFunction(node) {
        var count = functionStack.pop();

        if (ignoreTopLevelFunctions && functionStack.length === 0) {
            topLevelFunctions.push({ node: node, count: count});
        } else {
            reportIfTooManyStatements(node, count, maxStatements);
        }
    }

    /**
     * Increment the count of the functions
     * @param {ASTNode} node node to evaluate
     * @returns {void}
     * @private
     */
    function countStatements(node) {
        functionStack[functionStack.length - 1] += node.body.length;
    }

    //--------------------------------------------------------------------------
    // Public API
    //--------------------------------------------------------------------------

    return {
        FunctionDeclaration: startFunction,
        FunctionExpression: startFunction,
        ArrowFunctionExpression: startFunction,

        BlockStatement: countStatements,

        "FunctionDeclaration:exit": endFunction,
        "FunctionExpression:exit": endFunction,
        "ArrowFunctionExpression:exit": endFunction,

        "Program:exit": function() {
            if (topLevelFunctions.length === 1) {
                return;
            }

            topLevelFunctions.forEach(function(element) {
                var count = element.count;
                var node = element.node;

                reportIfTooManyStatements(node, count, maxStatements);
            });
        }
    };

}

};

},{}],187:[function(require,module,exports){ /**

* @fileoverview Rule to flag use of constructors without capital letters
* @author Nicholas C. Zakas
*/

“use strict”;

//—————————————————————————— // Requirements //——————————————————————————

var lodash = require(“lodash”);

//—————————————————————————— // Helpers //——————————————————————————

var CAPS_ALLOWED = [

"Array",
"Boolean",
"Date",
"Error",
"Function",
"Number",
"Object",
"RegExp",
"String",
"Symbol"

];

/**

* Ensure that if the key is provided, it must be an array.
* @param {Object} obj Object to check with `key`.
* @param {string} key Object key to check on `obj`.
* @param {*} fallback If obj[key] is not present, this will be returned.
* @returns {string[]} Returns obj[key] if it's an Array, otherwise `fallback`
*/

function checkArray(obj, key, fallback) {

/* istanbul ignore if */
if (Object.prototype.hasOwnProperty.call(obj, key) && !Array.isArray(obj[key])) {
    throw new TypeError(key + ", if provided, must be an Array");
}
return obj[key] || fallback;

}

/**

* A reducer function to invert an array to an Object mapping the string form of the key, to `true`.
* @param {Object} map Accumulator object for the reduce.
* @param {string} key Object key to set to `true`.
* @returns {Object} Returns the updated Object for further reduction.
*/

function invert(map, key) {

map[key] = true;
return map;

}

/**

* Creates an object with the cap is new exceptions as its keys and true as their values.
* @param {Object} config Rule configuration
* @returns {Object} Object with cap is new exceptions.
*/

function calculateCapIsNewExceptions(config) {

var capIsNewExceptions = checkArray(config, "capIsNewExceptions", CAPS_ALLOWED);

if (capIsNewExceptions !== CAPS_ALLOWED) {
    capIsNewExceptions = capIsNewExceptions.concat(CAPS_ALLOWED);
}

return capIsNewExceptions.reduce(invert, {});

}

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "require constructor `function` names to begin with a capital letter",
        category: "Stylistic Issues",
        recommended: false
    },

    schema: [
        {
            type: "object",
            properties: {
                newIsCap: {
                    type: "boolean"
                },
                capIsNew: {
                    type: "boolean"
                },
                newIsCapExceptions: {
                    type: "array",
                    items: {
                        type: "string"
                    }
                },
                capIsNewExceptions: {
                    type: "array",
                    items: {
                        type: "string"
                    }
                },
                properties: {
                    type: "boolean"
                }
            },
            additionalProperties: false
        }
    ]
},

create: function(context) {

    var config = context.options[0] ? lodash.assign({}, context.options[0]) : {};

    config.newIsCap = config.newIsCap !== false;
    config.capIsNew = config.capIsNew !== false;
    var skipProperties = config.properties === false;

    var newIsCapExceptions = checkArray(config, "newIsCapExceptions", []).reduce(invert, {});

    var capIsNewExceptions = calculateCapIsNewExceptions(config);

    var listeners = {};

    var sourceCode = context.getSourceCode();

    //--------------------------------------------------------------------------
    // Helpers
    //--------------------------------------------------------------------------

    /**
     * Get exact callee name from expression
     * @param {ASTNode} node CallExpression or NewExpression node
     * @returns {string} name
     */
    function extractNameFromExpression(node) {

        var name = "",
            property;

        if (node.callee.type === "MemberExpression") {
            property = node.callee.property;

            if (property.type === "Literal" && (typeof property.value === "string")) {
                name = property.value;
            } else if (property.type === "Identifier" && !node.callee.computed) {
                name = property.name;
            }
        } else {
            name = node.callee.name;
        }
        return name;
    }

    /**
     * Returns the capitalization state of the string -
     * Whether the first character is uppercase, lowercase, or non-alphabetic
     * @param {string} str String
     * @returns {string} capitalization state: "non-alpha", "lower", or "upper"
     */
    function getCap(str) {
        var firstChar = str.charAt(0);

        var firstCharLower = firstChar.toLowerCase();
        var firstCharUpper = firstChar.toUpperCase();

        if (firstCharLower === firstCharUpper) {

            // char has no uppercase variant, so it's non-alphabetic
            return "non-alpha";
        } else if (firstChar === firstCharLower) {
            return "lower";
        } else {
            return "upper";
        }
    }

    /**
     * Check if capitalization is allowed for a CallExpression
     * @param {Object} allowedMap Object mapping calleeName to a Boolean
     * @param {ASTNode} node CallExpression node
     * @param {string} calleeName Capitalized callee name from a CallExpression
     * @returns {Boolean} Returns true if the callee may be capitalized
     */
    function isCapAllowed(allowedMap, node, calleeName) {
        if (allowedMap[calleeName] || allowedMap[sourceCode.getText(node.callee)]) {
            return true;
        }

        if (calleeName === "UTC" && node.callee.type === "MemberExpression") {

            // allow if callee is Date.UTC
            return node.callee.object.type === "Identifier" &&
                node.callee.object.name === "Date";
        }

        return skipProperties && node.callee.type === "MemberExpression";
    }

    /**
     * Reports the given message for the given node. The location will be the start of the property or the callee.
     * @param {ASTNode} node CallExpression or NewExpression node.
     * @param {string} message The message to report.
     * @returns {void}
     */
    function report(node, message) {
        var callee = node.callee;

        if (callee.type === "MemberExpression") {
            callee = callee.property;
        }

        context.report(node, callee.loc.start, message);
    }

    //--------------------------------------------------------------------------
    // Public
    //--------------------------------------------------------------------------

    if (config.newIsCap) {
        listeners.NewExpression = function(node) {

            var constructorName = extractNameFromExpression(node);

            if (constructorName) {
                var capitalization = getCap(constructorName);
                var isAllowed = capitalization !== "lower" || isCapAllowed(newIsCapExceptions, node, constructorName);

                if (!isAllowed) {
                    report(node, "A constructor name should not start with a lowercase letter.");
                }
            }
        };
    }

    if (config.capIsNew) {
        listeners.CallExpression = function(node) {

            var calleeName = extractNameFromExpression(node);

            if (calleeName) {
                var capitalization = getCap(calleeName);
                var isAllowed = capitalization !== "upper" || isCapAllowed(capIsNewExceptions, node, calleeName);

                if (!isAllowed) {
                    report(node, "A function with a name starting with an uppercase letter should only be used as a constructor.");
                }
            }
        };
    }

    return listeners;
}

};

},{“lodash”:108}],188:[function(require,module,exports){ /**

* @fileoverview Rule to flag when using constructor without parentheses
* @author Ilya Volodin
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "require parentheses when invoking a constructor with no arguments",
        category: "Stylistic Issues",
        recommended: false
    },

    schema: []
},

create: function(context) {
    var sourceCode = context.getSourceCode();

    return {

        NewExpression: function(node) {
            var tokens = sourceCode.getTokens(node);
            var prenticesTokens = tokens.filter(function(token) {
                return token.value === "(" || token.value === ")";
            });

            if (prenticesTokens.length < 2) {
                context.report(node, "Missing '()' invoking a constructor");
            }
        }
    };

}

};

},{}],189:[function(require,module,exports){ /**

* @fileoverview Rule to check empty newline after "var" statement
* @author Gopal Venkatesan
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "require or disallow an empty line after `var` declarations",
        category: "Stylistic Issues",
        recommended: false
    },

    schema: [
        {
            enum: ["never", "always"]
        }
    ]
},

create: function(context) {

    var ALWAYS_MESSAGE = "Expected blank line after variable declarations.",
        NEVER_MESSAGE = "Unexpected blank line after variable declarations.";

    var sourceCode = context.getSourceCode();

    // Default `mode` to "always".
    var mode = context.options[0] === "never" ? "never" : "always";

    // Cache starting and ending line numbers of comments for faster lookup
    var commentEndLine = sourceCode.getAllComments().reduce(function(result, token) {
        result[token.loc.start.line] = token.loc.end.line;
        return result;
    }, {});

    //--------------------------------------------------------------------------
    // Helpers
    //--------------------------------------------------------------------------

    /**
     * Determine if provided keyword is a variable declaration
     * @private
     * @param {string} keyword - keyword to test
     * @returns {boolean} True if `keyword` is a type of var
     */
    function isVar(keyword) {
        return keyword === "var" || keyword === "let" || keyword === "const";
    }

    /**
     * Determine if provided keyword is a variant of for specifiers
     * @private
     * @param {string} keyword - keyword to test
     * @returns {boolean} True if `keyword` is a variant of for specifier
     */
    function isForTypeSpecifier(keyword) {
        return keyword === "ForStatement" || keyword === "ForInStatement" || keyword === "ForOfStatement";
    }

    /**
     * Determine if provided keyword is an export specifiers
     * @private
     * @param {string} nodeType - nodeType to test
     * @returns {boolean} True if `nodeType` is an export specifier
     */
    function isExportSpecifier(nodeType) {
        return nodeType === "ExportNamedDeclaration" || nodeType === "ExportSpecifier" ||
            nodeType === "ExportDefaultDeclaration" || nodeType === "ExportAllDeclaration";
    }

    /**
     * Determine if provided node is the last of their parent block.
     * @private
     * @param {ASTNode} node - node to test
     * @returns {boolean} True if `node` is last of their parent block.
     */
    function isLastNode(node) {
        var token = sourceCode.getTokenAfter(node);

        return !token || (token.type === "Punctuator" && token.value === "}");
    }

    /**
     * Determine if a token starts more than one line after a comment ends
     * @param  {token}   token            The token being checked
     * @param {integer}  commentStartLine The line number on which the comment starts
     * @returns {boolean}                 True if `token` does not start immediately after a comment
     */
    function hasBlankLineAfterComment(token, commentStartLine) {
        var commentEnd = commentEndLine[commentStartLine];

        // If there's another comment, repeat check for blank line
        if (commentEndLine[commentEnd + 1]) {
            return hasBlankLineAfterComment(token, commentEnd + 1);
        }

        return (token.loc.start.line > commentEndLine[commentStartLine] + 1);
    }

    /**
     * Checks that a blank line exists after a variable declaration when mode is
     * set to "always", or checks that there is no blank line when mode is set
     * to "never"
     * @private
     * @param {ASTNode} node - `VariableDeclaration` node to test
     * @returns {void}
     */
    function checkForBlankLine(node) {
        var lastToken = sourceCode.getLastToken(node),
            nextToken = sourceCode.getTokenAfter(node),
            nextLineNum = lastToken.loc.end.line + 1,
            noNextLineToken,
            hasNextLineComment;

        // Ignore if there is no following statement
        if (!nextToken) {
            return;
        }

        // Ignore if parent of node is a for variant
        if (isForTypeSpecifier(node.parent.type)) {
            return;
        }

        // Ignore if parent of node is an export specifier
        if (isExportSpecifier(node.parent.type)) {
            return;
        }

        // Some coding styles use multiple `var` statements, so do nothing if
        // the next token is a `var` statement.
        if (nextToken.type === "Keyword" && isVar(nextToken.value)) {
            return;
        }

        // Ignore if it is last statement in a block
        if (isLastNode(node)) {
            return;
        }

        // Next statement is not a `var`...
        noNextLineToken = nextToken.loc.start.line > nextLineNum;
        hasNextLineComment = (typeof commentEndLine[nextLineNum] !== "undefined");

        if (mode === "never" && noNextLineToken && !hasNextLineComment) {
            context.report(node, NEVER_MESSAGE, { identifier: node.name });
        }

        // Token on the next line, or comment without blank line
        if (
            mode === "always" && (
                !noNextLineToken ||
                hasNextLineComment && !hasBlankLineAfterComment(nextToken, nextLineNum)
            )
        ) {
            context.report(node, ALWAYS_MESSAGE, { identifier: node.name });
        }
    }

    //--------------------------------------------------------------------------
    // Public
    //--------------------------------------------------------------------------

    return {
        VariableDeclaration: checkForBlankLine
    };

}

};

},{}],190:[function(require,module,exports){ /**

* @fileoverview Rule to require newlines before `return` statement
* @author Kai Cataldo
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "require an empty line before `return` statements",
        category: "Stylistic Issues",
        recommended: false
    },

    schema: []
},

create: function(context) {
    var sourceCode = context.getSourceCode();

    //--------------------------------------------------------------------------
    // Helpers
    //--------------------------------------------------------------------------

    /**
     * Tests whether node is preceded by supplied tokens
     * @param {ASTNode} node - node to check
     * @param {array} testTokens - array of tokens to test against
     * @returns {boolean} Whether or not the node is preceded by one of the supplied tokens
     * @private
     */
    function isPrecededByTokens(node, testTokens) {
        var tokenBefore = sourceCode.getTokenBefore(node);

        return testTokens.some(function(token) {
            return tokenBefore.value === token;
        });
    }

    /**
     * Checks whether node is the first node after statement or in block
     * @param {ASTNode} node - node to check
     * @returns {boolean} Whether or not the node is the first node after statement or in block
     * @private
     */
    function isFirstNode(node) {
        var parentType = node.parent.type;

        if (node.parent.body) {
            return Array.isArray(node.parent.body)
              ? node.parent.body[0] === node
              : node.parent.body === node;
        }

        if (parentType === "IfStatement") {
            return isPrecededByTokens(node, ["else", ")"]);
        } else if (parentType === "DoWhileStatement") {
            return isPrecededByTokens(node, ["do"]);
        } else if (parentType === "SwitchCase") {
            return isPrecededByTokens(node, [":"]);
        } else {
            return isPrecededByTokens(node, [")"]);
        }
    }

    /**
     * Returns the number of lines of comments that precede the node
     * @param {ASTNode} node - node to check for overlapping comments
     * @param {number} lineNumTokenBefore - line number of previous token, to check for overlapping comments
     * @returns {number} Number of lines of comments that precede the node
     * @private
     */
    function calcCommentLines(node, lineNumTokenBefore) {
        var comments = sourceCode.getComments(node).leading,
            numLinesComments = 0;

        if (!comments.length) {
            return numLinesComments;
        }

        comments.forEach(function(comment) {
            numLinesComments++;

            if (comment.type === "Block") {
                numLinesComments += comment.loc.end.line - comment.loc.start.line;
            }

            // avoid counting lines with inline comments twice
            if (comment.loc.start.line === lineNumTokenBefore) {
                numLinesComments--;
            }

            if (comment.loc.end.line === node.loc.start.line) {
                numLinesComments--;
            }
        });

        return numLinesComments;
    }

    /**
     * Checks whether node is preceded by a newline
     * @param {ASTNode} node - node to check
     * @returns {boolean} Whether or not the node is preceded by a newline
     * @private
     */
    function hasNewlineBefore(node) {
        var tokenBefore = sourceCode.getTokenBefore(node),
            lineNumNode = node.loc.start.line,
            lineNumTokenBefore,
            commentLines;

        /**
         * Global return (at the beginning of a script) is a special case.
         * If there is no token before `return`, then we expect no line
         * break before the return. Comments are allowed to occupy lines
         * before the global return, just no blank lines.
         * Setting lineNumTokenBefore to zero in that case results in the
         * desired behavior.
         */
        if (tokenBefore) {
            lineNumTokenBefore = tokenBefore.loc.end.line;
        } else {
            lineNumTokenBefore = 0;     // global return at beginning of script
        }

        commentLines = calcCommentLines(node, lineNumTokenBefore);

        return (lineNumNode - lineNumTokenBefore - commentLines) > 1;
    }

    //--------------------------------------------------------------------------
    // Public
    //--------------------------------------------------------------------------

    return {
        ReturnStatement: function(node) {
            if (!isFirstNode(node) && !hasNewlineBefore(node)) {
                context.report({
                    node: node,
                    message: "Expected newline before return statement."
                });
            }
        }
    };
}

};

},{}],191:[function(require,module,exports){ /**

* @fileoverview Rule to ensure newline per method call when chaining calls
* @author Rajendra Patil
* @author Burak Yigit Kaya
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "require a newline after each call in a method chain",
        category: "Stylistic Issues",
        recommended: false
    },

    schema: [{
        type: "object",
        properties: {
            ignoreChainWithDepth: {
                type: "integer",
                minimum: 1,
                maximum: 10
            }
        },
        additionalProperties: false
    }]
},

create: function(context) {

    var options = context.options[0] || {},
        ignoreChainWithDepth = options.ignoreChainWithDepth || 2;

    var sourceCode = context.getSourceCode();

    /**
     * Gets the property text of a given MemberExpression node.
     * If the text is multiline, this returns only the first line.
     *
     * @param {ASTNode} node - A MemberExpression node to get.
     * @returns {string} The property text of the node.
     */
    function getPropertyText(node) {
        var prefix = node.computed ? "[" : ".";
        var lines = sourceCode.getText(node.property).split(/\r\n|\r|\n/g);
        var suffix = node.computed && lines.length === 1 ? "]" : "";

        return prefix + lines[0] + suffix;
    }

    return {
        "CallExpression:exit": function(node) {
            if (!node.callee || node.callee.type !== "MemberExpression") {
                return;
            }

            var callee = node.callee;
            var parent = callee.object;
            var depth = 1;

            while (parent && parent.callee) {
                depth += 1;
                parent = parent.callee.object;
            }

            if (depth > ignoreChainWithDepth && callee.property.loc.start.line === callee.object.loc.end.line) {
                context.report(
                    callee.property,
                    callee.property.loc.start,
                    "Expected line break before `" + getPropertyText(callee) + "`."
                );
            }
        }
    };
}

};

},{}],192:[function(require,module,exports){ /**

* @fileoverview Rule to flag use of alert, confirm, prompt
* @author Nicholas C. Zakas
*/

“use strict”;

//—————————————————————————— // Helpers //——————————————————————————

/**

* Checks if the given name is a prohibited identifier.
* @param {string} name The name to check
* @returns {boolean} Whether or not the name is prohibited.
*/

function isProhibitedIdentifier(name) {

return /^(alert|confirm|prompt)$/.test(name);

}

/**

* Reports the given node and identifier name.
* @param {RuleContext} context The ESLint rule context.
* @param {ASTNode} node The node to report on.
* @param {string} identifierName The name of the identifier.
* @returns {void}
*/

function report(context, node, identifierName) {

context.report(node, "Unexpected {{name}}.", { name: identifierName });

}

/**

* Returns the property name of a MemberExpression.
* @param {ASTNode} memberExpressionNode The MemberExpression node.
* @returns {string|null} Returns the property name if available, null else.
*/

function getPropertyName(memberExpressionNode) {

if (memberExpressionNode.computed) {
    if (memberExpressionNode.property.type === "Literal") {
        return memberExpressionNode.property.value;
    }
} else {
    return memberExpressionNode.property.name;
}
return null;

}

/**

* Finds the escope reference in the given scope.
* @param {Object} scope The scope to search.
* @param {ASTNode} node The identifier node.
* @returns {Reference|null} Returns the found reference or null if none were found.
*/

function findReference(scope, node) {

var references = scope.references.filter(function(reference) {
    return reference.identifier.range[0] === node.range[0] &&
        reference.identifier.range[1] === node.range[1];
});

if (references.length === 1) {
    return references[0];
}
return null;

}

/**

* Checks if the given identifier node is shadowed in the given scope.
* @param {Object} scope The current scope.
* @param {Object} globalScope The global scope.
* @param {string} node The identifier node to check
* @returns {boolean} Whether or not the name is shadowed.
*/

function isShadowed(scope, globalScope, node) {

var reference = findReference(scope, node);

return reference && reference.resolved && reference.resolved.defs.length > 0;

}

/**

* Checks if the given identifier node is a ThisExpression in the global scope or the global window property.
* @param {Object} scope The current scope.
* @param {Object} globalScope The global scope.
* @param {string} node The identifier node to check
* @returns {boolean} Whether or not the node is a reference to the global object.
*/

function isGlobalThisReferenceOrGlobalWindow(scope, globalScope, node) {

if (scope.type === "global" && node.type === "ThisExpression") {
    return true;
} else if (node.name === "window") {
    return !isShadowed(scope, globalScope, node);
}

return false;

}

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow the use of `alert`, `confirm`, and `prompt`",
        category: "Best Practices",
        recommended: false
    },

    schema: []
},

create: function(context) {
    var globalScope;

    return {

        Program: function() {
            globalScope = context.getScope();
        },

        CallExpression: function(node) {
            var callee = node.callee,
                identifierName,
                currentScope = context.getScope();

            // without window.
            if (callee.type === "Identifier") {
                identifierName = callee.name;

                if (!isShadowed(currentScope, globalScope, callee) && isProhibitedIdentifier(callee.name)) {
                    report(context, node, identifierName);
                }

            } else if (callee.type === "MemberExpression" && isGlobalThisReferenceOrGlobalWindow(currentScope, globalScope, callee.object)) {
                identifierName = getPropertyName(callee);

                if (isProhibitedIdentifier(identifierName)) {
                    report(context, node, identifierName);
                }
            }

        }
    };

}

};

},{}],193:[function(require,module,exports){ /**

* @fileoverview Disallow construction of dense arrays using the Array constructor
* @author Matt DuVall <http://www.mattduvall.com/>
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow `Array` constructors",
        category: "Stylistic Issues",
        recommended: false
    },

    schema: []
},

create: function(context) {

    /**
     * Disallow construction of dense arrays using the Array constructor
     * @param {ASTNode} node node to evaluate
     * @returns {void}
     * @private
     */
    function check(node) {
        if (
            node.arguments.length !== 1 &&
            node.callee.type === "Identifier" &&
            node.callee.name === "Array"
        ) {
            context.report(node, "The array literal notation [] is preferrable.");
        }
    }

    return {
        CallExpression: check,
        NewExpression: check
    };

}

};

},{}],194:[function(require,module,exports){ /**

* @fileoverview Rule to flag bitwise identifiers
* @author Nicholas C. Zakas
*/

“use strict”;

// // Set of bitwise operators. // var BITWISE_OPERATORS = [

"^", "|", "&", "<<", ">>", ">>>",
"^=", "|=", "&=", "<<=", ">>=", ">>>=",
"~"

];

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow bitwise operators",
        category: "Stylistic Issues",
        recommended: false
    },

    schema: [
        {
            type: "object",
            properties: {
                allow: {
                    type: "array",
                    items: {
                        enum: BITWISE_OPERATORS
                    },
                    uniqueItems: true
                },
                int32Hint: {
                    type: "boolean"
                }
            },
            additionalProperties: false
        }
    ]
},

create: function(context) {
    var options = context.options[0] || {};
    var allowed = options.allow || [];
    var int32Hint = options.int32Hint === true;

    /**
     * Reports an unexpected use of a bitwise operator.
     * @param   {ASTNode} node Node which contains the bitwise operator.
     * @returns {void}
     */
    function report(node) {
        context.report(node, "Unexpected use of '{{operator}}'.", { operator: node.operator });
    }

    /**
     * Checks if the given node has a bitwise operator.
     * @param   {ASTNode} node The node to check.
     * @returns {boolean} Whether or not the node has a bitwise operator.
     */
    function hasBitwiseOperator(node) {
        return BITWISE_OPERATORS.indexOf(node.operator) !== -1;
    }

    /**
     * Checks if exceptions were provided, e.g. `{ allow: ['~', '|'] }`.
     * @param   {ASTNode} node The node to check.
     * @returns {boolean} Whether or not the node has a bitwise operator.
     */
    function allowedOperator(node) {
        return allowed.indexOf(node.operator) !== -1;
    }

    /**
     * Checks if the given bitwise operator is used for integer typecasting, i.e. "|0"
     * @param   {ASTNode} node The node to check.
     * @returns {boolean} whether the node is used in integer typecasting.
     */
    function isInt32Hint(node) {
        return int32Hint && node.operator === "|" && node.right &&
          node.right.type === "Literal" && node.right.value === 0;
    }

    /**
     * Report if the given node contains a bitwise operator.
     * @param   {ASTNode} node The node to check.
     * @returns {void}
     */
    function checkNodeForBitwiseOperator(node) {
        if (hasBitwiseOperator(node) && !allowedOperator(node) && !isInt32Hint(node)) {
            report(node);
        }
    }

    return {
        AssignmentExpression: checkNodeForBitwiseOperator,
        BinaryExpression: checkNodeForBitwiseOperator,
        UnaryExpression: checkNodeForBitwiseOperator
    };

}

};

},{}],195:[function(require,module,exports){ /**

* @fileoverview Rule to flag use of arguments.callee and arguments.caller.
* @author Nicholas C. Zakas
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow the use of `arguments.caller` or `arguments.callee`",
        category: "Best Practices",
        recommended: false
    },

    schema: []
},

create: function(context) {

    return {

        MemberExpression: function(node) {
            var objectName = node.object.name,
                propertyName = node.property.name;

            if (objectName === "arguments" && !node.computed && propertyName && propertyName.match(/^calle[er]$/)) {
                context.report(node, "Avoid arguments.{{property}}.", { property: propertyName });
            }

        }
    };

}

};

},{}],196:[function(require,module,exports){ /**

* @fileoverview Rule to flag use of an lexical declarations inside a case clause
* @author Erik Arvidsson
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow lexical declarations in case clauses",
        category: "Best Practices",
        recommended: true
    },

    schema: []
},

create: function(context) {

    /**
     * Checks whether or not a node is a lexical declaration.
     * @param {ASTNode} node A direct child statement of a switch case.
     * @returns {boolean} Whether or not the node is a lexical declaration.
     */
    function isLexicalDeclaration(node) {
        switch (node.type) {
            case "FunctionDeclaration":
            case "ClassDeclaration":
                return true;
            case "VariableDeclaration":
                return node.kind !== "var";
            default:
                return false;
        }
    }

    return {
        SwitchCase: function(node) {
            for (var i = 0; i < node.consequent.length; i++) {
                var statement = node.consequent[i];

                if (isLexicalDeclaration(statement)) {
                    context.report({
                        node: node,
                        message: "Unexpected lexical declaration in case block."
                    });
                }
            }
        }
    };

}

};

},{}],197:[function(require,module,exports){ /**

* @fileoverview Rule to flag variable leak in CatchClauses in IE 8 and earlier
* @author Ian Christian Myers
*/

“use strict”;

//—————————————————————————— // Requirements //——————————————————————————

var astUtils = require(“../ast-utils”);

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow `catch` clause parameters from shadowing variables in the outer scope",
        category: "Variables",
        recommended: false
    },

    schema: []
},

create: function(context) {

    //--------------------------------------------------------------------------
    // Helpers
    //--------------------------------------------------------------------------

    /**
     * Check if the parameters are been shadowed
     * @param {object} scope current scope
     * @param {string} name parameter name
     * @returns {boolean} True is its been shadowed
     */
    function paramIsShadowing(scope, name) {
        return astUtils.getVariableByName(scope, name) !== null;
    }

    //--------------------------------------------------------------------------
    // Public API
    //--------------------------------------------------------------------------

    return {

        CatchClause: function(node) {
            var scope = context.getScope();

            // When blockBindings is enabled, CatchClause creates its own scope
            // so start from one upper scope to exclude the current node
            if (scope.block === node) {
                scope = scope.upper;
            }

            if (paramIsShadowing(scope, node.param.name)) {
                context.report(node, "Value of '{{name}}' may be overwritten in IE 8 and earlier.",
                        { name: node.param.name });
            }
        }
    };

}

};

},{“../ast-utils”:124}],198:[function(require,module,exports){ /**

* @fileoverview A rule to disallow modifying variables of class declarations
* @author Toru Nagashima
*/

“use strict”;

var astUtils = require(“../ast-utils”);

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow reassigning class members",
        category: "ECMAScript 6",
        recommended: true
    },

    schema: []
},

create: function(context) {

    /**
     * Finds and reports references that are non initializer and writable.
     * @param {Variable} variable - A variable to check.
     * @returns {void}
     */
    function checkVariable(variable) {
        astUtils.getModifyingReferences(variable.references).forEach(function(reference) {
            context.report(
                reference.identifier,
                "'{{name}}' is a class.",
                {name: reference.identifier.name});

        });
    }

    /**
     * Finds and reports references that are non initializer and writable.
     * @param {ASTNode} node - A ClassDeclaration/ClassExpression node to check.
     * @returns {void}
     */
    function checkForClass(node) {
        context.getDeclaredVariables(node).forEach(checkVariable);
    }

    return {
        ClassDeclaration: checkForClass,
        ClassExpression: checkForClass
    };

}

};

},{“../ast-utils”:124}],199:[function(require,module,exports){ /**

* @fileoverview Rule to flag assignment in a conditional statement's test expression
* @author Stephen Murray <spmurrayzzz>
*/

“use strict”;

var NODE_DESCRIPTIONS = {

DoWhileStatement: "a 'do...while' statement",
ForStatement: "a 'for' statement",
IfStatement: "an 'if' statement",
WhileStatement: "a 'while' statement"

};

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow assignment operators in conditional expressions",
        category: "Possible Errors",
        recommended: true
    },

    schema: [
        {
            enum: ["except-parens", "always"]
        }
    ]
},

create: function(context) {

    var prohibitAssign = (context.options[0] || "except-parens");

    var sourceCode = context.getSourceCode();

    /**
     * Check whether an AST node is the test expression for a conditional statement.
     * @param {!Object} node The node to test.
     * @returns {boolean} `true` if the node is the text expression for a conditional statement; otherwise, `false`.
     */
    function isConditionalTestExpression(node) {
        return node.parent &&
            node.parent.test &&
            node === node.parent.test;
    }

    /**
     * Given an AST node, perform a bottom-up search for the first ancestor that represents a conditional statement.
     * @param {!Object} node The node to use at the start of the search.
     * @returns {?Object} The closest ancestor node that represents a conditional statement.
     */
    function findConditionalAncestor(node) {
        var currentAncestor = node;

        do {
            if (isConditionalTestExpression(currentAncestor)) {
                return currentAncestor.parent;
            }
        } while ((currentAncestor = currentAncestor.parent));

        return null;
    }

    /**
     * Check whether the code represented by an AST node is enclosed in parentheses.
     * @param {!Object} node The node to test.
     * @returns {boolean} `true` if the code is enclosed in parentheses; otherwise, `false`.
     */
    function isParenthesised(node) {
        var previousToken = sourceCode.getTokenBefore(node),
            nextToken = sourceCode.getTokenAfter(node);

        return previousToken.value === "(" && previousToken.range[1] <= node.range[0] &&
            nextToken.value === ")" && nextToken.range[0] >= node.range[1];
    }

    /**
     * Check whether the code represented by an AST node is enclosed in two sets of parentheses.
     * @param {!Object} node The node to test.
     * @returns {boolean} `true` if the code is enclosed in two sets of parentheses; otherwise, `false`.
     */
    function isParenthesisedTwice(node) {
        var previousToken = sourceCode.getTokenBefore(node, 1),
            nextToken = sourceCode.getTokenAfter(node, 1);

        return isParenthesised(node) &&
            previousToken.value === "(" && previousToken.range[1] <= node.range[0] &&
            nextToken.value === ")" && nextToken.range[0] >= node.range[1];
    }

    /**
     * Check a conditional statement's test expression for top-level assignments that are not enclosed in parentheses.
     * @param {!Object} node The node for the conditional statement.
     * @returns {void}
     */
    function testForAssign(node) {
        if (node.test &&
            (node.test.type === "AssignmentExpression") &&
            (node.type === "ForStatement" ?
                !isParenthesised(node.test) :
                !isParenthesisedTwice(node.test)
            )
        ) {

            // must match JSHint's error message
            context.report({
                node: node,
                loc: node.test.loc.start,
                message: "Expected a conditional expression and instead saw an assignment."
            });
        }
    }

    /**
     * Check whether an assignment expression is descended from a conditional statement's test expression.
     * @param {!Object} node The node for the assignment expression.
     * @returns {void}
     */
    function testForConditionalAncestor(node) {
        var ancestor = findConditionalAncestor(node);

        if (ancestor) {
            context.report(ancestor, "Unexpected assignment within {{type}}.", {
                type: NODE_DESCRIPTIONS[ancestor.type] || ancestor.type
            });
        }
    }

    if (prohibitAssign === "always") {
        return {
            AssignmentExpression: testForConditionalAncestor
        };
    }

    return {
        DoWhileStatement: testForAssign,
        ForStatement: testForAssign,
        IfStatement: testForAssign,
        WhileStatement: testForAssign
    };

}

};

},{}],200:[function(require,module,exports){ /**

* @fileoverview A rule to warn against using arrow functions when they could be
* confused with comparisions
* @author Jxck <https://github.com/Jxck>
*/

“use strict”;

var astUtils = require(“../ast-utils.js”);

//—————————————————————————— // Helpers //——————————————————————————

/**

* Checks whether or not a node is a conditional expression.
* @param {ASTNode} node - node to test
* @returns {boolean} `true` if the node is a conditional expression.
*/

function isConditional(node) {

return node && node.type === "ConditionalExpression";

}

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow arrow functions where they could be confused with comparisons",
        category: "ECMAScript 6",
        recommended: false
    },

    schema: [{
        type: "object",
        properties: {
            allowParens: {type: "boolean"}
        },
        additionalProperties: false
    }]
},

create: function(context) {
    var config = context.options[0] || {};
    var sourceCode = context.getSourceCode();

    /**
     * Reports if an arrow function contains an ambiguous conditional.
     * @param {ASTNode} node - A node to check and report.
     * @returns {void}
     */
    function checkArrowFunc(node) {
        var body = node.body;

        if (isConditional(body) && !(config.allowParens && astUtils.isParenthesised(sourceCode, body))) {
            context.report(node, "Arrow function used ambiguously with a conditional expression.");
        }
    }

    return {
        ArrowFunctionExpression: checkArrowFunc
    };
}

};

},{“../ast-utils.js”:124}],201:[function(require,module,exports){ /**

* @fileoverview Rule to flag use of console object
* @author Nicholas C. Zakas
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow the use of `console`",
        category: "Possible Errors",
        recommended: true
    },

    schema: [
        {
            type: "object",
            properties: {
                allow: {
                    type: "array",
                    items: {
                        type: "string"
                    },
                    minItems: 1,
                    uniqueItems: true
                }
            },
            additionalProperties: false
        }
    ]
},

create: function(context) {

    return {

        MemberExpression: function(node) {

            if (node.object.name === "console") {
                var blockConsole = true;

                if (context.options.length > 0) {
                    var allowedProperties = context.options[0].allow;
                    var passedProperty = node.property.name;
                    var propertyIsAllowed = (allowedProperties.indexOf(passedProperty) > -1);

                    if (propertyIsAllowed) {
                        blockConsole = false;
                    }
                }

                if (blockConsole) {
                    context.report(node, "Unexpected console statement.");
                }
            }
        }
    };

}

};

},{}],202:[function(require,module,exports){ /**

* @fileoverview A rule to disallow modifying variables that are declared using `const`
* @author Toru Nagashima
*/

“use strict”;

var astUtils = require(“../ast-utils”);

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow reassigning `const` variables",
        category: "ECMAScript 6",
        recommended: true
    },

    schema: []
},

create: function(context) {

    /**
     * Finds and reports references that are non initializer and writable.
     * @param {Variable} variable - A variable to check.
     * @returns {void}
     */
    function checkVariable(variable) {
        astUtils.getModifyingReferences(variable.references).forEach(function(reference) {
            context.report(
                reference.identifier,
                "'{{name}}' is constant.",
                {name: reference.identifier.name});
        });
    }

    return {
        VariableDeclaration: function(node) {
            if (node.kind === "const") {
                context.getDeclaredVariables(node).forEach(checkVariable);
            }
        }
    };

}

};

},{“../ast-utils”:124}],203:[function(require,module,exports){ /**

* @fileoverview Rule to flag use constant conditions
* @author Christian Schulz <http://rndm.de>
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow constant expressions in conditions",
        category: "Possible Errors",
        recommended: true
    },

    schema: [
        {
            type: "object",
            properties: {
                checkLoops: {
                    type: "boolean"
                }
            },
            additionalProperties: false
        }

    ]
},

create: function(context) {
    var options = context.options[0] || {},
        checkLoops = options.checkLoops !== false;

    //--------------------------------------------------------------------------
    // Helpers
    //--------------------------------------------------------------------------

    /**
     * Checks if a branch node of LogicalExpression short circuits the whole condition
     * @param {ASTNode} node The branch of main condition which needs to be checked
     * @param {string} operator The operator of the main LogicalExpression.
     * @returns {boolean} true when condition short circuits whole condition
     */
    function isLogicalIdentity(node, operator) {
        switch (node.type) {
            case "Literal":
                return (operator === "||" && node.value === true) ||
                       (operator === "&&" && node.value === false);
            case "LogicalExpression":
                return isLogicalIdentity(node.left, node.operator) ||
                         isLogicalIdentity(node.right, node.operator);

                 // no default
        }
        return false;
    }

    /**
     * Checks if a node has a constant truthiness value.
     * @param {ASTNode} node The AST node to check.
     * @param {boolean} inBooleanPosition `false` if checking branch of a condition.
     *  `true` in all other cases
     * @returns {Bool} true when node's truthiness is constant
     * @private
     */
    function isConstant(node, inBooleanPosition) {
        switch (node.type) {
            case "Literal":
            case "ArrowFunctionExpression":
            case "FunctionExpression":
            case "ObjectExpression":
            case "ArrayExpression":
                return true;

            case "UnaryExpression":
                return (node.operator === "typeof" && inBooleanPosition) ||
                    isConstant(node.argument, true);

            case "BinaryExpression":
                return isConstant(node.left, false) &&
                        isConstant(node.right, false) &&
                        node.operator !== "in";
            case "LogicalExpression":
                var isLeftConstant = isConstant(node.left, inBooleanPosition);
                var isRightConstant = isConstant(node.right, inBooleanPosition);
                var isLeftShortCircuit = (isLeftConstant && isLogicalIdentity(node.left, node.operator));
                var isRightShortCircuit = (isRightConstant && isLogicalIdentity(node.right, node.operator));

                return (isLeftConstant && isRightConstant) || isLeftShortCircuit || isRightShortCircuit;
            case "AssignmentExpression":
                return (node.operator === "=") && isConstant(node.right, inBooleanPosition);

            case "SequenceExpression":
                return isConstant(node.expressions[node.expressions.length - 1], inBooleanPosition);

            // no default
        }
        return false;
    }

    /**
     * Reports when the given node contains a constant condition.
     * @param {ASTNode} node The AST node to check.
     * @returns {void}
     * @private
     */
    function checkConstantCondition(node) {
        if (node.test && isConstant(node.test, true)) {
            context.report(node, "Unexpected constant condition.");
        }
    }

    /**
     * Checks node when checkLoops option is enabled
     * @param {ASTNode} node The AST node to check.
     * @returns {void}
     * @private
     */
    function checkLoop(node) {
        if (checkLoops) {
            checkConstantCondition(node);
        }
    }

    //--------------------------------------------------------------------------
    // Public
    //--------------------------------------------------------------------------

    return {
        ConditionalExpression: checkConstantCondition,
        IfStatement: checkConstantCondition,
        WhileStatement: checkLoop,
        DoWhileStatement: checkLoop,
        ForStatement: checkLoop
    };

}

};

},{}],204:[function(require,module,exports){ /**

* @fileoverview Rule to flag use of continue statement
* @author Borislav Zhivkov
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow `continue` statements",
        category: "Stylistic Issues",
        recommended: false
    },

    schema: []
},

create: function(context) {

    return {
        ContinueStatement: function(node) {
            context.report(node, "Unexpected use of continue statement");
        }
    };

}

};

},{}],205:[function(require,module,exports){ /**

* @fileoverview Rule to forbid control charactes from regular expressions.
* @author Nicholas C. Zakas
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow control characters in regular expressions",
        category: "Possible Errors",
        recommended: true
    },

    schema: []
},

create: function(context) {

    /**
     * Get the regex expression
     * @param {ASTNode} node node to evaluate
     * @returns {*} Regex if found else null
     * @private
     */
    function getRegExp(node) {
        if (node.value instanceof RegExp) {
            return node.value;
        } else if (typeof node.value === "string") {

            var parent = context.getAncestors().pop();

            if ((parent.type === "NewExpression" || parent.type === "CallExpression") &&
                parent.callee.type === "Identifier" && parent.callee.name === "RegExp"
            ) {

                // there could be an invalid regular expression string
                try {
                    return new RegExp(node.value);
                } catch (ex) {
                    return null;
                }
            }
        }

        return null;
    }

    /**
     * Check if given regex string has control characters in it
     * @param {String} regexStr regex as string to check
     * @returns {Boolean} returns true if finds control characters on given string
     * @private
     */
    function hasControlCharacters(regexStr) {

        // check control characters, if RegExp object used
        var hasControlChars = /[\x00-\x1f]/.test(regexStr); // eslint-disable-line no-control-regex

        // check substr, if regex literal used
        var subStrIndex = regexStr.search(/\\x[01][0-9a-f]/i);

        if (!hasControlChars && subStrIndex > -1) {

            // is it escaped, check backslash count
            var possibleEscapeCharacters = regexStr.substr(0, subStrIndex).match(/\\+$/gi);

            hasControlChars = possibleEscapeCharacters === null || !(possibleEscapeCharacters[0].length % 2);
        }

        return hasControlChars;
    }

    return {
        Literal: function(node) {
            var computedValue,
                regex = getRegExp(node);

            if (regex) {
                computedValue = regex.toString();

                if (hasControlCharacters(computedValue)) {
                    context.report(node, "Unexpected control character in regular expression.");
                }
            }
        }
    };

}

};

},{}],206:[function(require,module,exports){ /**

* @fileoverview Rule to flag use of a debugger statement
* @author Nicholas C. Zakas
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow the use of `debugger`",
        category: "Possible Errors",
        recommended: true
    },

    schema: []
},

create: function(context) {

    return {
        DebuggerStatement: function(node) {
            context.report(node, "Unexpected 'debugger' statement.");
        }
    };

}

};

},{}],207:[function(require,module,exports){ /**

* @fileoverview Rule to flag when deleting variables
* @author Ilya Volodin
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow deleting variables",
        category: "Variables",
        recommended: true
    },

    schema: []
},

create: function(context) {

    return {

        UnaryExpression: function(node) {
            if (node.operator === "delete" && node.argument.type === "Identifier") {
                context.report(node, "Variables should not be deleted.");
            }
        }
    };

}

};

},{}],208:[function(require,module,exports){ /**

* @fileoverview Rule to check for ambiguous div operator in regexes
* @author Matt DuVall <http://www.mattduvall.com>
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow division operators explicitly at the beginning of regular expressions",
        category: "Best Practices",
        recommended: false
    },

    schema: []
},

create: function(context) {
    var sourceCode = context.getSourceCode();

    return {

        Literal: function(node) {
            var token = sourceCode.getFirstToken(node);

            if (token.type === "RegularExpression" && token.value[1] === "=") {
                context.report(node, "A regular expression literal can be confused with '/='.");
            }
        }
    };

}

};

},{}],209:[function(require,module,exports){ /**

* @fileoverview Rule to flag duplicate arguments
* @author Jamund Ferguson
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow duplicate arguments in `function` definitions",
        category: "Possible Errors",
        recommended: true
    },

    schema: []
},

create: function(context) {

    //--------------------------------------------------------------------------
    // Helpers
    //--------------------------------------------------------------------------

    /**
     * Checks whether or not a given definition is a parameter's.
     * @param {escope.DefEntry} def - A definition to check.
     * @returns {boolean} `true` if the definition is a parameter's.
     */
    function isParameter(def) {
        return def.type === "Parameter";
    }

    /**
     * Determines if a given node has duplicate parameters.
     * @param {ASTNode} node The node to check.
     * @returns {void}
     * @private
     */
    function checkParams(node) {
        var variables = context.getDeclaredVariables(node);

        for (var i = 0; i < variables.length; ++i) {
            var variable = variables[i];

            // Checks and reports duplications.
            var defs = variable.defs.filter(isParameter);

            if (defs.length >= 2) {
                context.report({
                    node: node,
                    message: "Duplicate param '{{name}}'.",
                    data: {name: variable.name}
                });
            }
        }
    }

    //--------------------------------------------------------------------------
    // Public API
    //--------------------------------------------------------------------------

    return {
        FunctionDeclaration: checkParams,
        FunctionExpression: checkParams
    };

}

};

},{}],210:[function(require,module,exports){ /**

* @fileoverview A rule to disallow duplicate name in class members.
* @author Toru Nagashima
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow duplicate class members",
        category: "ECMAScript 6",
        recommended: true
    },

    schema: []
},

create: function(context) {
    var stack = [];

    /**
     * Gets state of a given member name.
     * @param {string} name - A name of a member.
     * @param {boolean} isStatic - A flag which specifies that is a static member.
     * @returns {object} A state of a given member name.
     *   - retv.init {boolean} A flag which shows the name is declared as normal member.
     *   - retv.get {boolean} A flag which shows the name is declared as getter.
     *   - retv.set {boolean} A flag which shows the name is declared as setter.
     */
    function getState(name, isStatic) {
        var stateMap = stack[stack.length - 1];
        var key = "$" + name; // to avoid "__proto__".

        if (!stateMap[key]) {
            stateMap[key] = {
                nonStatic: {init: false, get: false, set: false},
                static: {init: false, get: false, set: false}
            };
        }

        return stateMap[key][isStatic ? "static" : "nonStatic"];
    }

    /**
     * Gets the name text of a given node.
     *
     * @param {ASTNode} node - A node to get the name.
     * @returns {string} The name text of the node.
     */
    function getName(node) {
        switch (node.type) {
            case "Identifier": return node.name;
            case "Literal": return String(node.value);

            /* istanbul ignore next: syntax error */
            default: return "";
        }
    }

    return {

        // Initializes the stack of state of member declarations.
        Program: function() {
            stack = [];
        },

        // Initializes state of member declarations for the class.
        ClassBody: function() {
            stack.push(Object.create(null));
        },

        // Disposes the state for the class.
        "ClassBody:exit": function() {
            stack.pop();
        },

        // Reports the node if its name has been declared already.
        MethodDefinition: function(node) {
            if (node.computed) {
                return;
            }

            var name = getName(node.key);
            var state = getState(name, node.static);
            var isDuplicate = false;

            if (node.kind === "get") {
                isDuplicate = (state.init || state.get);
                state.get = true;
            } else if (node.kind === "set") {
                isDuplicate = (state.init || state.set);
                state.set = true;
            } else {
                isDuplicate = (state.init || state.get || state.set);
                state.init = true;
            }

            if (isDuplicate) {
                context.report(node, "Duplicate name '{{name}}'.", {name: name});
            }
        }
    };
}

};

},{}],211:[function(require,module,exports){ /**

* @fileoverview Rule to flag use of duplicate keys in an object.
* @author Ian Christian Myers
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow duplicate keys in object literals",
        category: "Possible Errors",
        recommended: true
    },

    schema: []
},

create: function(context) {

    return {

        ObjectExpression: function(node) {

            // Object that will be a map of properties--safe because we will
            // prefix all of the keys.
            var nodeProps = Object.create(null);

            node.properties.forEach(function(property) {

                if (property.type !== "Property") {
                    return;
                }

                var keyName = property.key.name || property.key.value,
                    key = property.kind + "-" + keyName,
                    checkProperty = (!property.computed || property.key.type === "Literal");

                if (checkProperty) {
                    if (nodeProps[key]) {
                        context.report(node, property.loc.start, "Duplicate key '{{key}}'.", { key: keyName });
                    } else {
                        nodeProps[key] = true;
                    }
                }
            });

        }
    };

}

};

},{}],212:[function(require,module,exports){ /**

* @fileoverview Rule to disallow a duplicate case label.
* @author Dieter Oberkofler
* @author Burak Yigit Kaya
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow duplicate case labels",
        category: "Possible Errors",
        recommended: true
    },

    schema: []
},

create: function(context) {
    var sourceCode = context.getSourceCode();

    return {
        SwitchStatement: function(node) {
            var mapping = {};

            node.cases.forEach(function(switchCase) {
                var key = sourceCode.getText(switchCase.test);

                if (mapping[key]) {
                    context.report(switchCase, "Duplicate case label.");
                } else {
                    mapping[key] = switchCase;
                }
            });
        }
    };
}

};

},{}],213:[function(require,module,exports){ /**

* @fileoverview Restrict usage of duplicate imports.
* @author Simen Bekkhus
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

/**

* Returns the name of the module imported or re-exported.
*
* @param {ASTNode} node - A node to get.
* @returns {string} the name of the module, or empty string if no name.
*/

function getValue(node) {

if (node && node.source && node.source.value) {
    return node.source.value.trim();
}

return "";

}

/**

* Checks if the name of the import or export exists in the given array, and reports if so.
*
* @param {RuleContext} context - The ESLint rule context object.
* @param {ASTNode} node - A node to get.
* @param {string} value - The name of the imported or exported module.
* @param {string[]} array - The array containing other imports or exports in the file.
* @param {string} message - A message to be reported after the name of the module
*
* @returns {void} No return value
*/

function checkAndReport(context, node, value, array, message) {

if (array.indexOf(value) !== -1) {
    context.report({
        node: node,
        message: "'{{module}}' " + message,
        data: {module: value}
    });
}

}

/**

* @callback nodeCallback
* @param {ASTNode} node - A node to handle.
*/

/**

* Returns a function handling the imports of a given file
*
* @param {RuleContext} context - The ESLint rule context object.
* @param {boolean} includeExports - Whether or not to check for exports in addition to imports.
* @param {string[]} importsInFile - The array containing other imports in the file.
* @param {string[]} exportsInFile - The array containing other exports in the file.
*
* @returns {nodeCallback} A function passed to ESLint to handle the statement.
*/

function handleImports(context, includeExports, importsInFile, exportsInFile) {

return function(node) {
    var value = getValue(node);

    if (value) {
        checkAndReport(context, node, value, importsInFile, "import is duplicated.");

        if (includeExports) {
            checkAndReport(context, node, value, exportsInFile, "import is duplicated as export.");
        }

        importsInFile.push(value);
    }
};

}

/**

* Returns a function handling the exports of a given file
*
* @param {RuleContext} context - The ESLint rule context object.
* @param {string[]} importsInFile - The array containing other imports in the file.
* @param {string[]} exportsInFile - The array containing other exports in the file.
*
* @returns {nodeCallback} A function passed to ESLint to handle the statement.
*/

function handleExports(context, importsInFile, exportsInFile) {

return function(node) {
    var value = getValue(node);

    if (value) {
        checkAndReport(context, node, value, exportsInFile, "export is duplicated.");
        checkAndReport(context, node, value, importsInFile, "export is duplicated as import.");

        exportsInFile.push(value);
    }
};

}

module.exports = {

meta: {
    docs: {
        description: "disallow duplicate module imports",
        category: "ECMAScript 6",
        recommended: false
    },

    schema: [{
        type: "object",
        properties: {
            includeExports: {
                type: "boolean"
            }
        },
        additionalProperties: false
    }]
},

create: function(context) {
    var includeExports = (context.options[0] || {}).includeExports,
        importsInFile = [],
        exportsInFile = [];

    var handlers = {
        ImportDeclaration: handleImports(context, includeExports, importsInFile, exportsInFile)
    };

    if (includeExports) {
        handlers.ExportNamedDeclaration = handleExports(context, importsInFile, exportsInFile);
        handlers.ExportAllDeclaration = handleExports(context, importsInFile, exportsInFile);
    }

    return handlers;
}

};

},{}],214:[function(require,module,exports){ /**

* @fileoverview Rule to flag `else` after a `return` in `if`
* @author Ian Christian Myers
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow `else` blocks after `return` statements in `if` statements",
        category: "Best Practices",
        recommended: false
    },

    schema: []
},

create: function(context) {

    //--------------------------------------------------------------------------
    // Helpers
    //--------------------------------------------------------------------------

    /**
     * Display the context report if rule is violated
     *
     * @param {Node} node The 'else' node
     * @returns {void}
     */
    function displayReport(node) {
        context.report(node, "Unexpected 'else' after 'return'.");
    }

    /**
     * Check to see if the node is a ReturnStatement
     *
     * @param {Node} node The node being evaluated
     * @returns {boolean} True if node is a return
     */
    function checkForReturn(node) {
        return node.type === "ReturnStatement";
    }

    /**
     * Naive return checking, does not iterate through the whole
     * BlockStatement because we make the assumption that the ReturnStatement
     * will be the last node in the body of the BlockStatement.
     *
     * @param {Node} node The consequent/alternate node
     * @returns {boolean} True if it has a return
     */
    function naiveHasReturn(node) {
        if (node.type === "BlockStatement") {
            var body = node.body,
                lastChildNode = body[body.length - 1];

            return lastChildNode && checkForReturn(lastChildNode);
        }
        return checkForReturn(node);
    }

    /**
     * Check to see if the node is valid for evaluation,
     * meaning it has an else and not an else-if
     *
     * @param {Node} node The node being evaluated
     * @returns {boolean} True if the node is valid
     */
    function hasElse(node) {
        return node.alternate && node.consequent && node.alternate.type !== "IfStatement";
    }

    /**
     * If the consequent is an IfStatement, check to see if it has an else
     * and both its consequent and alternate path return, meaning this is
     * a nested case of rule violation.  If-Else not considered currently.
     *
     * @param {Node} node The consequent node
     * @returns {boolean} True if this is a nested rule violation
     */
    function checkForIf(node) {
        return node.type === "IfStatement" && hasElse(node) &&
            naiveHasReturn(node.alternate) && naiveHasReturn(node.consequent);
    }

    /**
     * Check the consequent/body node to make sure it is not
     * a ReturnStatement or an IfStatement that returns on both
     * code paths.
     *
     * @param {Node} node The consequent or body node
     * @param {Node} alternate The alternate node
     * @returns {boolean} `true` if it is a Return/If node that always returns.
     */
    function checkForReturnOrIf(node) {
        return checkForReturn(node) || checkForIf(node);
    }

    /**
     * Check whether a node returns in every codepath.
     * @param {Node} node The node to be checked
     * @returns {boolean} `true` if it returns on every codepath.
     */
    function alwaysReturns(node) {
        if (node.type === "BlockStatement") {

            // If we have a BlockStatement, check each consequent body node.
            return node.body.some(checkForReturnOrIf);
        } else {

            /*
             * If not a block statement, make sure the consequent isn't a
             * ReturnStatement or an IfStatement with returns on both paths.
             */
            return checkForReturnOrIf(node);
        }
    }

    //--------------------------------------------------------------------------
    // Public API
    //--------------------------------------------------------------------------

    return {

        IfStatement: function(node) {
            var parent = context.getAncestors().pop(),
                consequents,
                alternate;

            // Only "top-level" if statements are checked, meaning the first `if`
            // in a `if-else-if-...` chain.
            if (parent.type === "IfStatement" && parent.alternate === node) {
                return;
            }

            for (consequents = []; node.type === "IfStatement"; node = node.alternate) {
                if (!node.alternate) {
                    return;
                }
                consequents.push(node.consequent);
                alternate = node.alternate;
            }

            if (consequents.every(alwaysReturns)) {
                displayReport(alternate);
            }
        }

    };

}

};

},{}],215:[function(require,module,exports){ /**

* @fileoverview Rule to flag the use of empty character classes in regular expressions
* @author Ian Christian Myers
*/

“use strict”;

//—————————————————————————— // Helpers //——————————————————————————

/* plain-English description of the following regexp:

  1. ‘^` fix the match at the beginning of the string

  2. ‘/`: the `/` that begins the regexp

  3. ‘([^\[]|\.|[([^\]]|\.)+])*`: regexp contents; 0 or more of the following

2.0. `[^\\[]`: any character that's not a `\` or a `[` (anything but escape sequences and character classes)
2.1. `\\.`: an escape sequence
2.2. `\[([^\\\]]|\\.)+\]`: a character class that isn't empty
  1. ‘/` the `/` that ends the regexp

  2. ‘[gimuy]*`: optional regexp flags

  3. ‘$`: fix the match at the end of the string

*/ var regex = /^/([^\[]|\.|[([^\]]|\.)+])/[gimuy]$/;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow empty character classes in regular expressions",
        category: "Possible Errors",
        recommended: true
    },

    schema: []
},

create: function(context) {
    var sourceCode = context.getSourceCode();

    return {

        Literal: function(node) {
            var token = sourceCode.getFirstToken(node);

            if (token.type === "RegularExpression" && !regex.test(token.value)) {
                context.report(node, "Empty class.");
            }
        }

    };

}

};

},{}],216:[function(require,module,exports){ /**

* @fileoverview Rule to disallow empty functions.
* @author Toru Nagashima
*/

“use strict”;

//—————————————————————————— // Helpers //——————————————————————————

var ALLOW_OPTIONS = Object.freeze([

"functions",
"arrowFunctions",
"generatorFunctions",
"methods",
"generatorMethods",
"getters",
"setters",
"constructors"

]); var SHOW_KIND = Object.freeze({

functions: "function",
arrowFunctions: "arrow function",
generatorFunctions: "generator function",
asyncFunctions: "async function",
methods: "method",
generatorMethods: "generator method",
asyncMethods: "async method",
getters: "getter",
setters: "setter",
constructors: "constructor"

});

/**

* Gets the kind of a given function node.
*
* @param {ASTNode} node - A function node to get. This is one of
*      an ArrowFunctionExpression, a FunctionDeclaration, or a
*      FunctionExpression.
* @returns {string} The kind of the function. This is one of "functions",
*      "arrowFunctions", "generatorFunctions", "asyncFunctions", "methods",
*      "generatorMethods", "asyncMethods", "getters", "setters", and
*      "constructors".
*/

function getKind(node) {

var parent = node.parent;
var kind = "";

if (node.type === "ArrowFunctionExpression") {
    return "arrowFunctions";
}

// Detects main kind.
if (parent.type === "Property") {
    if (parent.kind === "get") {
        return "getters";
    }
    if (parent.kind === "set") {
        return "setters";
    }
    kind = parent.method ? "methods" : "functions";

} else if (parent.type === "MethodDefinition") {
    if (parent.kind === "get") {
        return "getters";
    }
    if (parent.kind === "set") {
        return "setters";
    }
    if (parent.kind === "constructor") {
        return "constructors";
    }
    kind = "methods";

} else {
    kind = "functions";
}

// Detects prefix.
var prefix = "";

if (node.generator) {
    prefix = "generator";
} else if (node.async) {
    prefix = "async";
} else {
    return kind;
}
return prefix + kind[0].toUpperCase() + kind.slice(1);

}

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow empty functions",
        category: "Best Practices",
        recommended: false
    },

    schema: [
        {
            type: "object",
            properties: {
                allow: {
                    type: "array",
                    items: {enum: ALLOW_OPTIONS},
                    uniqueItems: true
                }
            },
            additionalProperties: false
        }
    ]
},

create: function(context) {
    var options = context.options[0] || {};
    var allowed = options.allow || [];

    var sourceCode = context.getSourceCode();

    /**
     * Reports a given function node if the node matches the following patterns.
     *
     * - Not allowed by options.
     * - The body is empty.
     * - The body doesn't have any comments.
     *
     * @param {ASTNode} node - A function node to report. This is one of
     *      an ArrowFunctionExpression, a FunctionDeclaration, or a
     *      FunctionExpression.
     * @returns {void}
     */
    function reportIfEmpty(node) {
        var kind = getKind(node);

        if (allowed.indexOf(kind) === -1 &&
            node.body.type === "BlockStatement" &&
            node.body.body.length === 0 &&
            sourceCode.getComments(node.body).trailing.length === 0
        ) {
            context.report({
                node: node,
                loc: node.body.loc.start,
                message: "Unexpected empty " + SHOW_KIND[kind] + "."
            });
        }
    }

    return {
        ArrowFunctionExpression: reportIfEmpty,
        FunctionDeclaration: reportIfEmpty,
        FunctionExpression: reportIfEmpty
    };
}

};

},{}],217:[function(require,module,exports){ /**

* @fileoverview Rule to disallow an empty pattern
* @author Alberto Rodríguez
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow empty destructuring patterns",
        category: "Best Practices",
        recommended: true
    },

    schema: []
},

create: function(context) {
    return {
        ObjectPattern: function(node) {
            if (node.properties.length === 0) {
                context.report(node, "Unexpected empty object pattern.");
            }
        },
        ArrayPattern: function(node) {
            if (node.elements.length === 0) {
                context.report(node, "Unexpected empty array pattern.");
            }
        }
    };
}

};

},{}],218:[function(require,module,exports){ /**

* @fileoverview Rule to flag use of an empty block statement
* @author Nicholas C. Zakas
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

var FUNCTION_TYPE = /^(?:ArrowFunctionExpression|Function(?:Declaration|Expression))$/;

module.exports = {

meta: {
    docs: {
        description: "disallow empty block statements",
        category: "Possible Errors",
        recommended: true
    },

    schema: [
        {
            type: "object",
            properties: {
                allowEmptyCatch: {
                    type: "boolean"
                }
            },
            additionalProperties: false
        }
    ]
},

create: function(context) {
    var options = context.options[0] || {},
        allowEmptyCatch = options.allowEmptyCatch || false;

    var sourceCode = context.getSourceCode();

    return {
        BlockStatement: function(node) {

            // if the body is not empty, we can just return immediately
            if (node.body.length !== 0) {
                return;
            }

            // a function is generally allowed to be empty
            if (FUNCTION_TYPE.test(node.parent.type)) {
                return;
            }

            if (allowEmptyCatch && node.parent.type === "CatchClause") {
                return;
            }

            // any other block is only allowed to be empty, if it contains a comment
            if (sourceCode.getComments(node).trailing.length > 0) {
                return;
            }

            context.report(node, "Empty block statement.");
        },

        SwitchStatement: function(node) {

            if (typeof node.cases === "undefined" || node.cases.length === 0) {
                context.report(node, "Empty switch statement.");
            }
        }
    };

}

};

},{}],219:[function(require,module,exports){ /**

* @fileoverview Rule to flag comparisons to null without a type-checking
* operator.
* @author Ian Christian Myers
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow `null` comparisons without type-checking operators",
        category: "Best Practices",
        recommended: false
    },

    schema: []
},

create: function(context) {

    return {

        BinaryExpression: function(node) {
            var badOperator = node.operator === "==" || node.operator === "!=";

            if (node.right.type === "Literal" && node.right.raw === "null" && badOperator ||
                    node.left.type === "Literal" && node.left.raw === "null" && badOperator) {
                context.report(node, "Use ‘===’ to compare with ‘null’.");
            }
        }
    };

}

};

},{}],220:[function(require,module,exports){ /**

* @fileoverview Rule to flag use of eval() statement
* @author Nicholas C. Zakas
*/

“use strict”;

//—————————————————————————— // Requirements //——————————————————————————

var astUtils = require(“../ast-utils”);

//—————————————————————————— // Helpers //——————————————————————————

var candidatesOfGlobalObject = Object.freeze([

"global",
"window"

]);

/**

* Checks a given node is a Identifier node of the specified name.
*
* @param {ASTNode} node - A node to check.
* @param {string} name - A name to check.
* @returns {boolean} `true` if the node is a Identifier node of the name.
*/

function isIdentifier(node, name) {

return node.type === "Identifier" && node.name === name;

}

/**

* Checks a given node is a Literal node of the specified string value.
*
* @param {ASTNode} node - A node to check.
* @param {string} name - A name to check.
* @returns {boolean} `true` if the node is a Literal node of the name.
*/

function isConstant(node, name) {

switch (node.type) {
    case "Literal":
        return node.value === name;

    case "TemplateLiteral":
        return (
            node.expressions.length === 0 &&
            node.quasis[0].value.cooked === name
        );

    default:
        return false;
}

}

/**

* Checks a given node is a MemberExpression node which has the specified name's
* property.
*
* @param {ASTNode} node - A node to check.
* @param {string} name - A name to check.
* @returns {boolean} `true` if the node is a MemberExpression node which has
*      the specified name's property
*/

function isMember(node, name) {

return (
    node.type === "MemberExpression" &&
    (node.computed ? isConstant : isIdentifier)(node.property, name)
);

}

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow the use of `eval()`",
        category: "Best Practices",
        recommended: false
    },

    schema: [
        {
            type: "object",
            properties: {
                allowIndirect: {type: "boolean"}
            },
            additionalProperties: false
        }
    ]
},

create: function(context) {
    var allowIndirect = Boolean(
        context.options[0] &&
        context.options[0].allowIndirect
    );
    var sourceCode = context.getSourceCode();
    var funcInfo = null;

    /**
     * Pushs a variable scope (Program or Function) information to the stack.
     *
     * This is used in order to check whether or not `this` binding is a
     * reference to the global object.
     *
     * @param {ASTNode} node - A node of the scope. This is one of Program,
     *      FunctionDeclaration, FunctionExpression, and ArrowFunctionExpression.
     * @returns {void}
     */
    function enterVarScope(node) {
        var strict = context.getScope().isStrict;

        funcInfo = {
            upper: funcInfo,
            node: node,
            strict: strict,
            defaultThis: false,
            initialized: strict
        };
    }

    /**
     * Pops a variable scope from the stack.
     *
     * @returns {void}
     */
    function exitVarScope() {
        funcInfo = funcInfo.upper;
    }

    /**
     * Reports a given node.
     *
     * `node` is `Identifier` or `MemberExpression`.
     * The parent of `node` might be `CallExpression`.
     *
     * The location of the report is always `eval` `Identifier` (or possibly
     * `Literal`). The type of the report is `CallExpression` if the parent is
     * `CallExpression`. Otherwise, it's the given node type.
     *
     * @param {ASTNode} node - A node to report.
     * @returns {void}
     */
    function report(node) {
        var locationNode = node;
        var parent = node.parent;

        if (node.type === "MemberExpression") {
            locationNode = node.property;
        }
        if (parent.type === "CallExpression" && parent.callee === node) {
            node = parent;
        }

        context.report({
            node: node,
            loc: locationNode.loc.start,
            message: "eval can be harmful."
        });
    }

    /**
     * Reports accesses of `eval` via the global object.
     *
     * @param {escope.Scope} globalScope - The global scope.
     * @returns {void}
     */
    function reportAccessingEvalViaGlobalObject(globalScope) {
        for (var i = 0; i < candidatesOfGlobalObject.length; ++i) {
            var name = candidatesOfGlobalObject[i];
            var variable = astUtils.getVariableByName(globalScope, name);

            if (!variable) {
                continue;
            }

            var references = variable.references;

            for (var j = 0; j < references.length; ++j) {
                var identifier = references[j].identifier;
                var node = identifier.parent;

                // To detect code like `window.window.eval`.
                while (isMember(node, name)) {
                    node = node.parent;
                }

                // Reports.
                if (isMember(node, "eval")) {
                    report(node);
                }
            }
        }
    }

    /**
     * Reports all accesses of `eval` (excludes direct calls to eval).
     *
     * @param {escope.Scope} globalScope - The global scope.
     * @returns {void}
     */
    function reportAccessingEval(globalScope) {
        var variable = astUtils.getVariableByName(globalScope, "eval");

        if (!variable) {
            return;
        }

        var references = variable.references;

        for (var i = 0; i < references.length; ++i) {
            var reference = references[i];
            var id = reference.identifier;

            if (id.name === "eval" && !astUtils.isCallee(id)) {

                // Is accessing to eval (excludes direct calls to eval)
                report(id);
            }
        }
    }

    if (allowIndirect) {

        // Checks only direct calls to eval. It's simple!
        return {
            "CallExpression:exit": function(node) {
                var callee = node.callee;

                if (isIdentifier(callee, "eval")) {
                    report(callee);
                }
            }
        };
    }

    return {
        "CallExpression:exit": function(node) {
            var callee = node.callee;

            if (isIdentifier(callee, "eval")) {
                report(callee);
            }
        },

        Program: function(node) {
            var scope = context.getScope(),
                features = context.parserOptions.ecmaFeatures || {},
                strict =
                    scope.isStrict ||
                    node.sourceType === "module" ||
                    (features.globalReturn && scope.childScopes[0].isStrict);

            funcInfo = {
                upper: null,
                node: node,
                strict: strict,
                defaultThis: true,
                initialized: true
            };
        },

        "Program:exit": function() {
            var globalScope = context.getScope();

            exitVarScope();
            reportAccessingEval(globalScope);
            reportAccessingEvalViaGlobalObject(globalScope);
        },

        FunctionDeclaration: enterVarScope,
        "FunctionDeclaration:exit": exitVarScope,
        FunctionExpression: enterVarScope,
        "FunctionExpression:exit": exitVarScope,
        ArrowFunctionExpression: enterVarScope,
        "ArrowFunctionExpression:exit": exitVarScope,

        ThisExpression: function(node) {
            if (!isMember(node.parent, "eval")) {
                return;
            }

            /*
             * `this.eval` is found.
             * Checks whether or not the value of `this` is the global object.
             */
            if (!funcInfo.initialized) {
                funcInfo.initialized = true;
                funcInfo.defaultThis = astUtils.isDefaultThisBinding(
                    funcInfo.node,
                    sourceCode
                );
            }

            if (!funcInfo.strict && funcInfo.defaultThis) {

                // `this.eval` is possible built-in `eval`.
                report(node.parent);
            }
        }
    };

}

};

},{“../ast-utils”:124}],221:[function(require,module,exports){ /**

* @fileoverview Rule to flag assignment of the exception parameter
* @author Stephen Murray <spmurrayzzz>
*/

“use strict”;

var astUtils = require(“../ast-utils”);

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow reassigning exceptions in `catch` clauses",
        category: "Possible Errors",
        recommended: true
    },

    schema: []
},

create: function(context) {

    /**
     * Finds and reports references that are non initializer and writable.
     * @param {Variable} variable - A variable to check.
     * @returns {void}
     */
    function checkVariable(variable) {
        astUtils.getModifyingReferences(variable.references).forEach(function(reference) {
            context.report(
                reference.identifier,
                "Do not assign to the exception parameter.");
        });
    }

    return {
        CatchClause: function(node) {
            context.getDeclaredVariables(node).forEach(checkVariable);
        }
    };

}

};

},{“../ast-utils”:124}],222:[function(require,module,exports){ /**

* @fileoverview Rule to flag adding properties to native object's prototypes.
* @author David Nelson
*/

“use strict”;

//—————————————————————————— // Requirements //——————————————————————————

var globals = require(“globals”);

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow extending native types",
        category: "Best Practices",
        recommended: false
    },

    schema: [
        {
            type: "object",
            properties: {
                exceptions: {
                    type: "array",
                    items: {
                        type: "string"
                    },
                    uniqueItems: true
                }
            },
            additionalProperties: false
        }
    ]
},

create: function(context) {

    var config = context.options[0] || {};
    var exceptions = config.exceptions || [];
    var modifiedBuiltins = Object.keys(globals.builtin).filter(function(builtin) {
        return builtin[0].toUpperCase() === builtin[0];
    });

    if (exceptions.length) {
        modifiedBuiltins = modifiedBuiltins.filter(function(builtIn) {
            return exceptions.indexOf(builtIn) === -1;
        });
    }

    return {

        // handle the Array.prototype.extra style case
        AssignmentExpression: function(node) {
            var lhs = node.left,
                affectsProto;

            if (lhs.type !== "MemberExpression" || lhs.object.type !== "MemberExpression") {
                return;
            }

            affectsProto = lhs.object.computed ?
                lhs.object.property.type === "Literal" && lhs.object.property.value === "prototype" :
                lhs.object.property.name === "prototype";

            if (!affectsProto) {
                return;
            }

            modifiedBuiltins.forEach(function(builtin) {
                if (lhs.object.object.name === builtin) {
                    context.report(node, builtin + " prototype is read only, properties should not be added.");
                }
            });
        },

        // handle the Object.definePropert[y|ies](Array.prototype) case
        CallExpression: function(node) {

            var callee = node.callee,
                subject,
                object;

            // only worry about Object.definePropert[y|ies]
            if (callee.type === "MemberExpression" &&
                callee.object.name === "Object" &&
                (callee.property.name === "defineProperty" || callee.property.name === "defineProperties")) {

                // verify the object being added to is a native prototype
                subject = node.arguments[0];
                object = subject && subject.object;
                if (object &&
                    object.type === "Identifier" &&
                    (modifiedBuiltins.indexOf(object.name) > -1) &&
                    subject.property.name === "prototype") {

                    context.report(node, object.name + " prototype is read only, properties should not be added.");
                }
            }

        }
    };

}

};

},{“globals”:98}],223:[function(require,module,exports){ /**

* @fileoverview Rule to flag unnecessary bind calls
* @author Bence Dányi <bence@danyi.me>
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow unnecessary calls to `.bind()`",
        category: "Best Practices",
        recommended: false
    },

    schema: []
},

create: function(context) {
    var scopeInfo = null;

    /**
     * Reports a given function node.
     *
     * @param {ASTNode} node - A node to report. This is a FunctionExpression or
     *      an ArrowFunctionExpression.
     * @returns {void}
     */
    function report(node) {
        context.report({
            node: node.parent.parent,
            message: "The function binding is unnecessary.",
            loc: node.parent.property.loc.start
        });
    }

    /**
     * Gets the property name of a given node.
     * If the property name is dynamic, this returns an empty string.
     *
     * @param {ASTNode} node - A node to check. This is a MemberExpression.
     * @returns {string} The property name of the node.
     */
    function getPropertyName(node) {
        if (node.computed) {
            switch (node.property.type) {
                case "Literal":
                    return String(node.property.value);
                case "TemplateLiteral":
                    if (node.property.expressions.length === 0) {
                        return node.property.quasis[0].value.cooked;
                    }

                    // fallthrough
                default:
                    return false;
            }
        }
        return node.property.name;
    }

    /**
     * Checks whether or not a given function node is the callee of `.bind()`
     * method.
     *
     * e.g. `(function() {}.bind(foo))`
     *
     * @param {ASTNode} node - A node to report. This is a FunctionExpression or
     *      an ArrowFunctionExpression.
     * @returns {boolean} `true` if the node is the callee of `.bind()` method.
     */
    function isCalleeOfBindMethod(node) {
        var parent = node.parent;
        var grandparent = parent.parent;

        return (
            grandparent &&
            grandparent.type === "CallExpression" &&
            grandparent.callee === parent &&
            grandparent.arguments.length === 1 &&
            parent.type === "MemberExpression" &&
            parent.object === node &&
            getPropertyName(parent) === "bind"
        );
    }

    /**
     * Adds a scope information object to the stack.
     *
     * @param {ASTNode} node - A node to add. This node is a FunctionExpression
     *      or a FunctionDeclaration node.
     * @returns {void}
     */
    function enterFunction(node) {
        scopeInfo = {
            isBound: isCalleeOfBindMethod(node),
            thisFound: false,
            upper: scopeInfo
        };
    }

    /**
     * Removes the scope information object from the top of the stack.
     * At the same time, this reports the function node if the function has
     * `.bind()` and the `this` keywords found.
     *
     * @param {ASTNode} node - A node to remove. This node is a
     *      FunctionExpression or a FunctionDeclaration node.
     * @returns {void}
     */
    function exitFunction(node) {
        if (scopeInfo.isBound && !scopeInfo.thisFound) {
            report(node);
        }

        scopeInfo = scopeInfo.upper;
    }

    /**
     * Reports a given arrow function if the function is callee of `.bind()`
     * method.
     *
     * @param {ASTNode} node - A node to report. This node is an
     *      ArrowFunctionExpression.
     * @returns {void}
     */
    function exitArrowFunction(node) {
        if (isCalleeOfBindMethod(node)) {
            report(node);
        }
    }

    /**
     * Set the mark as the `this` keyword was found in this scope.
     *
     * @returns {void}
     */
    function markAsThisFound() {
        if (scopeInfo) {
            scopeInfo.thisFound = true;
        }
    }

    return {
        "ArrowFunctionExpression:exit": exitArrowFunction,
        FunctionDeclaration: enterFunction,
        "FunctionDeclaration:exit": exitFunction,
        FunctionExpression: enterFunction,
        "FunctionExpression:exit": exitFunction,
        ThisExpression: markAsThisFound
    };
}

};

},{}],224:[function(require,module,exports){ /**

* @fileoverview Rule to flag unnecessary double negation in Boolean contexts
* @author Brandon Mills
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow unnecessary boolean casts",
        category: "Possible Errors",
        recommended: true
    },

    schema: []
},

create: function(context) {

    // Node types which have a test which will coerce values to booleans.
    var BOOLEAN_NODE_TYPES = [
        "IfStatement",
        "DoWhileStatement",
        "WhileStatement",
        "ConditionalExpression",
        "ForStatement"
    ];

    /**
     * Check if a node is in a context where its value would be coerced to a boolean at runtime.
     *
     * @param {Object} node The node
     * @param {Object} parent Its parent
     * @returns {Boolean} If it is in a boolean context
     */
    function isInBooleanContext(node, parent) {
        return (
            (BOOLEAN_NODE_TYPES.indexOf(parent.type) !== -1 &&
                node === parent.test) ||

            // !<bool>
            (parent.type === "UnaryExpression" &&
                parent.operator === "!")
        );
    }

    return {
        UnaryExpression: function(node) {
            var ancestors = context.getAncestors(),
                parent = ancestors.pop(),
                grandparent = ancestors.pop();

            // Exit early if it's guaranteed not to match
            if (node.operator !== "!" ||
                    parent.type !== "UnaryExpression" ||
                    parent.operator !== "!") {
                return;
            }

            if (isInBooleanContext(parent, grandparent) ||

                // Boolean(<bool>) and new Boolean(<bool>)
                ((grandparent.type === "CallExpression" || grandparent.type === "NewExpression") &&
                    grandparent.callee.type === "Identifier" &&
                    grandparent.callee.name === "Boolean")
            ) {
                context.report(node, "Redundant double negation.");
            }
        },
        CallExpression: function(node) {
            var parent = node.parent;

            if (node.callee.type !== "Identifier" || node.callee.name !== "Boolean") {
                return;
            }

            if (isInBooleanContext(node, parent)) {
                context.report(node, "Redundant Boolean call.");
            }
        }
    };

}

};

},{}],225:[function(require,module,exports){ /**

* @fileoverview Rule to disallow unnecessary labels
* @author Toru Nagashima
*/

“use strict”;

//—————————————————————————— // Requirements //——————————————————————————

var astUtils = require(“../ast-utils”);

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow unnecessary labels",
        category: "Best Practices",
        recommended: false
    },

    schema: []
},

create: function(context) {
    var scopeInfo = null;

    /**
     * Creates a new scope with a breakable statement.
     *
     * @param {ASTNode} node - A node to create. This is a BreakableStatement.
     * @returns {void}
     */
    function enterBreakableStatement(node) {
        scopeInfo = {
            label: astUtils.getLabel(node),
            breakable: true,
            upper: scopeInfo
        };
    }

    /**
     * Removes the top scope of the stack.
     *
     * @returns {void}
     */
    function exitBreakableStatement() {
        scopeInfo = scopeInfo.upper;
    }

    /**
     * Creates a new scope with a labeled statement.
     *
     * This ignores it if the body is a breakable statement.
     * In this case it's handled in the `enterBreakableStatement` function.
     *
     * @param {ASTNode} node - A node to create. This is a LabeledStatement.
     * @returns {void}
     */
    function enterLabeledStatement(node) {
        if (!astUtils.isBreakableStatement(node.body)) {
            scopeInfo = {
                label: node.label.name,
                breakable: false,
                upper: scopeInfo
            };
        }
    }

    /**
     * Removes the top scope of the stack.
     *
     * This ignores it if the body is a breakable statement.
     * In this case it's handled in the `exitBreakableStatement` function.
     *
     * @param {ASTNode} node - A node. This is a LabeledStatement.
     * @returns {void}
     */
    function exitLabeledStatement(node) {
        if (!astUtils.isBreakableStatement(node.body)) {
            scopeInfo = scopeInfo.upper;
        }
    }

    /**
     * Reports a given control node if it's unnecessary.
     *
     * @param {ASTNode} node - A node. This is a BreakStatement or a
     *      ContinueStatement.
     * @returns {void}
     */
    function reportIfUnnecessary(node) {
        if (!node.label) {
            return;
        }

        var labelNode = node.label;
        var label = labelNode.name;
        var info = scopeInfo;

        while (info) {
            if (info.breakable || info.label === label) {
                if (info.breakable && info.label === label) {
                    context.report({
                        node: labelNode,
                        message: "This label '{{name}}' is unnecessary.",
                        data: labelNode
                    });
                }
                return;
            }

            info = info.upper;
        }
    }

    return {
        WhileStatement: enterBreakableStatement,
        "WhileStatement:exit": exitBreakableStatement,
        DoWhileStatement: enterBreakableStatement,
        "DoWhileStatement:exit": exitBreakableStatement,
        ForStatement: enterBreakableStatement,
        "ForStatement:exit": exitBreakableStatement,
        ForInStatement: enterBreakableStatement,
        "ForInStatement:exit": exitBreakableStatement,
        ForOfStatement: enterBreakableStatement,
        "ForOfStatement:exit": exitBreakableStatement,
        SwitchStatement: enterBreakableStatement,
        "SwitchStatement:exit": exitBreakableStatement,
        LabeledStatement: enterLabeledStatement,
        "LabeledStatement:exit": exitLabeledStatement,
        BreakStatement: reportIfUnnecessary,
        ContinueStatement: reportIfUnnecessary
    };
}

};

},{“../ast-utils”:124}],226:[function(require,module,exports){ /**

* @fileoverview Disallow parenthesising higher precedence subexpressions.
* @author Michael Ficarra
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

var astUtils = require(“../ast-utils.js”);

module.exports = {

meta: {
    docs: {
        description: "disallow unnecessary parentheses",
        category: "Possible Errors",
        recommended: false
    },

    schema: {
        anyOf: [
            {
                type: "array",
                items: [
                    {
                        enum: ["functions"]
                    }
                ],
                minItems: 0,
                maxItems: 1
            },
            {
                type: "array",
                items: [
                    {
                        enum: ["all"]
                    },
                    {
                        type: "object",
                        properties: {
                            conditionalAssign: {type: "boolean"},
                            nestedBinaryExpressions: {type: "boolean"},
                            returnAssign: {type: "boolean"}
                        },
                        additionalProperties: false
                    }
                ],
                minItems: 0,
                maxItems: 2
            }
        ]
    }
},

create: function(context) {
    var sourceCode = context.getSourceCode();

    var isParenthesised = astUtils.isParenthesised.bind(astUtils, sourceCode);
    var precedence = astUtils.getPrecedence;
    var ALL_NODES = context.options[0] !== "functions";
    var EXCEPT_COND_ASSIGN = ALL_NODES && context.options[1] && context.options[1].conditionalAssign === false;
    var NESTED_BINARY = ALL_NODES && context.options[1] && context.options[1].nestedBinaryExpressions === false;
    var EXCEPT_RETURN_ASSIGN = ALL_NODES && context.options[1] && context.options[1].returnAssign === false;

    /**
     * Determines if this rule should be enforced for a node given the current configuration.
     * @param {ASTNode} node - The node to be checked.
     * @returns {boolean} True if the rule should be enforced for this node.
     * @private
     */
    function ruleApplies(node) {
        return ALL_NODES || node.type === "FunctionExpression" || node.type === "ArrowFunctionExpression";
    }

    /**
     * Determines if a node is surrounded by parentheses twice.
     * @param {ASTNode} node - The node to be checked.
     * @returns {boolean} True if the node is doubly parenthesised.
     * @private
     */
    function isParenthesisedTwice(node) {
        var previousToken = sourceCode.getTokenBefore(node, 1),
            nextToken = sourceCode.getTokenAfter(node, 1);

        return isParenthesised(node) && previousToken && nextToken &&
            previousToken.value === "(" && previousToken.range[1] <= node.range[0] &&
            nextToken.value === ")" && nextToken.range[0] >= node.range[1];
    }

    /**
     * Determines if a node is surrounded by (potentially) invalid parentheses.
     * @param {ASTNode} node - The node to be checked.
     * @returns {boolean} True if the node is incorrectly parenthesised.
     * @private
     */
    function hasExcessParens(node) {
        return ruleApplies(node) && isParenthesised(node);
    }

    /**
     * Determines if a node that is expected to be parenthesised is surrounded by
     * (potentially) invalid extra parentheses.
     * @param {ASTNode} node - The node to be checked.
     * @returns {boolean} True if the node is has an unexpected extra pair of parentheses.
     * @private
     */
    function hasDoubleExcessParens(node) {
        return ruleApplies(node) && isParenthesisedTwice(node);
    }

    /**
     * Determines if a node test expression is allowed to have a parenthesised assignment
     * @param {ASTNode} node - The node to be checked.
     * @returns {boolean} True if the assignment can be parenthesised.
     * @private
     */
    function isCondAssignException(node) {
        return EXCEPT_COND_ASSIGN && node.test.type === "AssignmentExpression";
    }

    /**
     * Determines if a node is in a return statement
     * @param {ASTNode} node - The node to be checked.
     * @returns {boolean} True if the node is in a return statement.
     * @private
     */
    function isInReturnStatement(node) {
        while (node) {
            if (node.type === "ReturnStatement" ||
                    (node.type === "ArrowFunctionExpression" && node.body.type !== "BlockStatement")) {
                return true;
            }
            node = node.parent;
        }

        return false;
    }

    /**
     * Determines if a node is or contains an assignment expression
     * @param {ASTNode} node - The node to be checked.
     * @returns {boolean} True if the node is or contains an assignment expression.
     * @private
     */
    function containsAssignment(node) {
        if (node.type === "AssignmentExpression") {
            return true;
        } else if (node.type === "ConditionalExpression" &&
                (node.consequent.type === "AssignmentExpression" || node.alternate.type === "AssignmentExpression")) {
            return true;
        } else if ((node.left && node.left.type === "AssignmentExpression") ||
                (node.right && node.right.type === "AssignmentExpression")) {
            return true;
        }

        return false;
    }

    /**
     * Determines if a node is contained by or is itself a return statement and is allowed to have a parenthesised assignment
     * @param {ASTNode} node - The node to be checked.
     * @returns {boolean} True if the assignment can be parenthesised.
     * @private
     */
    function isReturnAssignException(node) {
        if (!EXCEPT_RETURN_ASSIGN || !isInReturnStatement(node)) {
            return false;
        }

        if (node.type === "ReturnStatement") {
            return node.argument && containsAssignment(node.argument);
        } else if (node.type === "ArrowFunctionExpression" && node.body.type !== "BlockStatement") {
            return containsAssignment(node.body);
        } else {
            return containsAssignment(node);
        }
    }

    /**
     * Determines if a node following a [no LineTerminator here] restriction is
     * surrounded by (potentially) invalid extra parentheses.
     * @param {Token} token - The token preceding the [no LineTerminator here] restriction.
     * @param {ASTNode} node - The node to be checked.
     * @returns {boolean} True if the node is incorrectly parenthesised.
     * @private
     */
    function hasExcessParensNoLineTerminator(token, node) {
        if (token.loc.end.line === node.loc.start.line) {
            return hasExcessParens(node);
        }

        return hasDoubleExcessParens(node);
    }

    /**
     * Checks whether or not a given node is located at the head of ExpressionStatement.
     * @param {ASTNode} node - A node to check.
     * @returns {boolean} `true` if the node is located at the head of ExpressionStatement.
     */
    function isHeadOfExpressionStatement(node) {
        var parent = node.parent;

        while (parent) {
            switch (parent.type) {
                case "SequenceExpression":
                    if (parent.expressions[0] !== node || isParenthesised(node)) {
                        return false;
                    }
                    break;

                case "UnaryExpression":
                case "UpdateExpression":
                    if (parent.prefix || isParenthesised(node)) {
                        return false;
                    }
                    break;

                case "BinaryExpression":
                case "LogicalExpression":
                    if (parent.left !== node || isParenthesised(node)) {
                        return false;
                    }
                    break;

                case "ConditionalExpression":
                    if (parent.test !== node || isParenthesised(node)) {
                        return false;
                    }
                    break;

                case "CallExpression":
                    if (parent.callee !== node || isParenthesised(node)) {
                        return false;
                    }
                    break;

                case "MemberExpression":
                    if (parent.object !== node || isParenthesised(node)) {
                        return false;
                    }
                    break;

                case "ExpressionStatement":
                    return true;

                default:
                    return false;
            }

            node = parent;
            parent = parent.parent;
        }

        /* istanbul ignore next */
        throw new Error("unreachable");
    }

    /**
     * Report the node
     * @param {ASTNode} node node to evaluate
     * @returns {void}
     * @private
     */
    function report(node) {
        var previousToken = sourceCode.getTokenBefore(node);

        context.report(node, previousToken.loc.start, "Gratuitous parentheses around expression.");
    }

    /**
     * Evaluate Unary update
     * @param {ASTNode} node node to evaluate
     * @returns {void}
     * @private
     */
    function dryUnaryUpdate(node) {
        if (hasExcessParens(node.argument) && precedence(node.argument) >= precedence(node)) {
            report(node.argument);
        }
    }

    /**
     * Evaluate a new call
     * @param {ASTNode} node node to evaluate
     * @returns {void}
     * @private
     */
    function dryCallNew(node) {
        if (hasExcessParens(node.callee) && precedence(node.callee) >= precedence(node) && !(
            node.type === "CallExpression" &&
            node.callee.type === "FunctionExpression" &&

            // One set of parentheses are allowed for a function expression
            !hasDoubleExcessParens(node.callee)
        )) {
            report(node.callee);
        }
        if (node.arguments.length === 1) {
            if (hasDoubleExcessParens(node.arguments[0]) && precedence(node.arguments[0]) >= precedence({type: "AssignmentExpression"})) {
                report(node.arguments[0]);
            }
        } else {
            [].forEach.call(node.arguments, function(arg) {
                if (hasExcessParens(arg) && precedence(arg) >= precedence({type: "AssignmentExpression"})) {
                    report(arg);
                }
            });
        }
    }

    /**
     * Evaluate binary logicals
     * @param {ASTNode} node node to evaluate
     * @returns {void}
     * @private
     */
    function dryBinaryLogical(node) {
        if (!NESTED_BINARY) {
            var prec = precedence(node);

            if (hasExcessParens(node.left) && precedence(node.left) >= prec) {
                report(node.left);
            }
            if (hasExcessParens(node.right) && precedence(node.right) > prec) {
                report(node.right);
            }
        }
    }

    return {
        ArrayExpression: function(node) {
            [].forEach.call(node.elements, function(e) {
                if (e && hasExcessParens(e) && precedence(e) >= precedence({type: "AssignmentExpression"})) {
                    report(e);
                }
            });
        },

        ArrowFunctionExpression: function(node) {
            if (isReturnAssignException(node)) {
                return;
            }

            if (node.body.type !== "BlockStatement") {
                if (sourceCode.getFirstToken(node.body).value !== "{" && hasExcessParens(node.body) && precedence(node.body) >= precedence({type: "AssignmentExpression"})) {
                    report(node.body);
                    return;
                }

                // Object literals *must* be parenthesised
                if (node.body.type === "ObjectExpression" && hasDoubleExcessParens(node.body)) {
                    report(node.body);
                    return;
                }
            }
        },

        AssignmentExpression: function(node) {
            if (isReturnAssignException(node)) {
                return;
            }

            if (hasExcessParens(node.right) && precedence(node.right) >= precedence(node)) {
                report(node.right);
            }
        },

        BinaryExpression: dryBinaryLogical,
        CallExpression: dryCallNew,

        ConditionalExpression: function(node) {
            if (isReturnAssignException(node)) {
                return;
            }

            if (hasExcessParens(node.test) && precedence(node.test) >= precedence({type: "LogicalExpression", operator: "||"})) {
                report(node.test);
            }

            if (hasExcessParens(node.consequent) && precedence(node.consequent) >= precedence({type: "AssignmentExpression"})) {
                report(node.consequent);
            }

            if (hasExcessParens(node.alternate) && precedence(node.alternate) >= precedence({type: "AssignmentExpression"})) {
                report(node.alternate);
            }
        },

        DoWhileStatement: function(node) {
            if (hasDoubleExcessParens(node.test) && !isCondAssignException(node)) {
                report(node.test);
            }
        },

        ExpressionStatement: function(node) {
            var firstToken, secondToken, firstTokens;

            if (hasExcessParens(node.expression)) {
                firstTokens = sourceCode.getFirstTokens(node.expression, 2);
                firstToken = firstTokens[0];
                secondToken = firstTokens[1];

                if (
                    !firstToken ||
                    firstToken.value !== "{" &&
                    firstToken.value !== "function" &&
                    firstToken.value !== "class" &&
                    (
                        firstToken.value !== "let" ||
                        !secondToken ||
                        secondToken.value !== "["
                    )
                ) {
                    report(node.expression);
                }
            }
        },

        ForInStatement: function(node) {
            if (hasExcessParens(node.right)) {
                report(node.right);
            }
        },

        ForOfStatement: function(node) {
            if (hasExcessParens(node.right)) {
                report(node.right);
            }
        },

        ForStatement: function(node) {
            if (node.init && hasExcessParens(node.init)) {
                report(node.init);
            }

            if (node.test && hasExcessParens(node.test) && !isCondAssignException(node)) {
                report(node.test);
            }

            if (node.update && hasExcessParens(node.update)) {
                report(node.update);
            }
        },

        IfStatement: function(node) {
            if (hasDoubleExcessParens(node.test) && !isCondAssignException(node)) {
                report(node.test);
            }
        },

        LogicalExpression: dryBinaryLogical,

        MemberExpression: function(node) {
            if (
                hasExcessParens(node.object) &&
                precedence(node.object) >= precedence(node) &&
                (
                    node.computed ||
                    !(
                        (node.object.type === "Literal" &&
                        typeof node.object.value === "number" &&
                        /^[0-9]+$/.test(sourceCode.getFirstToken(node.object).value))
                        ||

                        // RegExp literal is allowed to have parens (#1589)
                        (node.object.type === "Literal" && node.object.regex)
                    )
                ) &&
                !(
                    (node.object.type === "FunctionExpression" || node.object.type === "ClassExpression") &&
                    isHeadOfExpressionStatement(node) &&
                    !hasDoubleExcessParens(node.object)
                )
            ) {
                report(node.object);
            }
            if (node.computed && hasExcessParens(node.property)) {
                report(node.property);
            }
        },

        NewExpression: dryCallNew,

        ObjectExpression: function(node) {
            [].forEach.call(node.properties, function(e) {
                var v = e.value;

                if (v && hasExcessParens(v) && precedence(v) >= precedence({type: "AssignmentExpression"})) {
                    report(v);
                }
            });
        },

        ReturnStatement: function(node) {
            var returnToken = sourceCode.getFirstToken(node);

            if (isReturnAssignException(node)) {
                return;
            }

            if (node.argument &&
                    hasExcessParensNoLineTerminator(returnToken, node.argument) &&

                    // RegExp literal is allowed to have parens (#1589)
                    !(node.argument.type === "Literal" && node.argument.regex)) {
                report(node.argument);
            }
        },

        SequenceExpression: function(node) {
            [].forEach.call(node.expressions, function(e) {
                if (hasExcessParens(e) && precedence(e) >= precedence(node)) {
                    report(e);
                }
            });
        },

        SwitchCase: function(node) {
            if (node.test && hasExcessParens(node.test)) {
                report(node.test);
            }
        },

        SwitchStatement: function(node) {
            if (hasDoubleExcessParens(node.discriminant)) {
                report(node.discriminant);
            }
        },

        ThrowStatement: function(node) {
            var throwToken = sourceCode.getFirstToken(node);

            if (hasExcessParensNoLineTerminator(throwToken, node.argument)) {
                report(node.argument);
            }
        },

        UnaryExpression: dryUnaryUpdate,
        UpdateExpression: dryUnaryUpdate,

        VariableDeclarator: function(node) {
            if (node.init && hasExcessParens(node.init) &&
                    precedence(node.init) >= precedence({type: "AssignmentExpression"}) &&

                    // RegExp literal is allowed to have parens (#1589)
                    !(node.init.type === "Literal" && node.init.regex)) {
                report(node.init);
            }
        },

        WhileStatement: function(node) {
            if (hasDoubleExcessParens(node.test) && !isCondAssignException(node)) {
                report(node.test);
            }
        },

        WithStatement: function(node) {
            if (hasDoubleExcessParens(node.object)) {
                report(node.object);
            }
        },

        YieldExpression: function(node) {
            var yieldToken;

            if (node.argument) {
                yieldToken = sourceCode.getFirstToken(node);

                if ((precedence(node.argument) >= precedence(node) &&
                        hasExcessParensNoLineTerminator(yieldToken, node.argument)) ||
                        hasDoubleExcessParens(node.argument)) {
                    report(node.argument);
                }
            }
        }
    };

}

};

},{“../ast-utils.js”:124}],227:[function(require,module,exports){ /**

* @fileoverview Rule to flag use of unnecessary semicolons
* @author Nicholas C. Zakas
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow unnecessary semicolons",
        category: "Possible Errors",
        recommended: true
    },

    fixable: "code",
    schema: []
},

create: function(context) {
    var sourceCode = context.getSourceCode();

    /**
     * Reports an unnecessary semicolon error.
     * @param {Node|Token} nodeOrToken - A node or a token to be reported.
     * @returns {void}
     */
    function report(nodeOrToken) {
        context.report({
            node: nodeOrToken,
            message: "Unnecessary semicolon.",
            fix: function(fixer) {
                return fixer.remove(nodeOrToken);
            }
        });
    }

    /**
     * Checks for a part of a class body.
     * This checks tokens from a specified token to a next MethodDefinition or the end of class body.
     *
     * @param {Token} firstToken - The first token to check.
     * @returns {void}
     */
    function checkForPartOfClassBody(firstToken) {
        for (var token = firstToken;
            token.type === "Punctuator" && token.value !== "}";
            token = sourceCode.getTokenAfter(token)
        ) {
            if (token.value === ";") {
                report(token);
            }
        }
    }

    return {

        /**
         * Reports this empty statement, except if the parent node is a loop.
         * @param {Node} node - A EmptyStatement node to be reported.
         * @returns {void}
         */
        EmptyStatement: function(node) {
            var parent = node.parent,
                allowedParentTypes = [
                    "ForStatement",
                    "ForInStatement",
                    "ForOfStatement",
                    "WhileStatement",
                    "DoWhileStatement",
                    "IfStatement",
                    "LabeledStatement",
                    "WithStatement"
                ];

            if (allowedParentTypes.indexOf(parent.type) === -1) {
                report(node);
            }
        },

        /**
         * Checks tokens from the head of this class body to the first MethodDefinition or the end of this class body.
         * @param {Node} node - A ClassBody node to check.
         * @returns {void}
         */
        ClassBody: function(node) {
            checkForPartOfClassBody(sourceCode.getFirstToken(node, 1)); // 0 is `{`.
        },

        /**
         * Checks tokens from this MethodDefinition to the next MethodDefinition or the end of this class body.
         * @param {Node} node - A MethodDefinition node of the start point.
         * @returns {void}
         */
        MethodDefinition: function(node) {
            checkForPartOfClassBody(sourceCode.getTokenAfter(node));
        }
    };

}

};

},{}],228:[function(require,module,exports){ /**

* @fileoverview Rule to flag fall-through cases in switch statements.
* @author Matt DuVall <http://mattduvall.com/>
*/

“use strict”;

//—————————————————————————— // Requirements //——————————————————————————

var lodash = require(“lodash”);

//—————————————————————————— // Helpers //——————————————————————————

var DEFAULT_FALLTHROUGH_COMMENT = /falls?s?through/i;

/**

* Checks whether or not a given node has a fallthrough comment.
* @param {ASTNode} node - A SwitchCase node to get comments.
* @param {RuleContext} context - A rule context which stores comments.
* @param {RegExp} fallthroughCommentPattern - A pattern to match comment to.
* @returns {boolean} `true` if the node has a valid fallthrough comment.
*/

function hasFallthroughComment(node, context, fallthroughCommentPattern) {

var sourceCode = context.getSourceCode();
var comment = lodash.last(sourceCode.getComments(node).leading);

return Boolean(comment && fallthroughCommentPattern.test(comment.value));

}

/**

* Checks whether or not a given code path segment is reachable.
* @param {CodePathSegment} segment - A CodePathSegment to check.
* @returns {boolean} `true` if the segment is reachable.
*/

function isReachable(segment) {

return segment.reachable;

}

/**

* Checks whether a node and a token are separated by blank lines
* @param {ASTNode} node - The node to check
* @param {Token} token - The token to compare against
* @returns {boolean} `true` if there are blank lines between node and token
*/

function hasBlankLinesBetween(node, token) {

return token.loc.start.line > node.loc.end.line + 1;

}

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow fallthrough of `case` statements",
        category: "Best Practices",
        recommended: true
    },

    schema: [
        {
            type: "object",
            properties: {
                commentPattern: {
                    type: "string"
                }
            },
            additionalProperties: false
        }
    ]
},

create: function(context) {
    var options = context.options[0] || {};
    var currentCodePath = null;
    var sourceCode = context.getSourceCode();

    /*
     * We need to use leading comments of the next SwitchCase node because
     * trailing comments is wrong if semicolons are omitted.
     */
    var fallthroughCase = null;
    var fallthroughCommentPattern = null;

    if (options.commentPattern) {
        fallthroughCommentPattern = new RegExp(options.commentPattern);
    } else {
        fallthroughCommentPattern = DEFAULT_FALLTHROUGH_COMMENT;
    }

    return {
        onCodePathStart: function(codePath) {
            currentCodePath = codePath;
        },
        onCodePathEnd: function() {
            currentCodePath = currentCodePath.upper;
        },

        SwitchCase: function(node) {

            /*
             * Checks whether or not there is a fallthrough comment.
             * And reports the previous fallthrough node if that does not exist.
             */
            if (fallthroughCase && !hasFallthroughComment(node, context, fallthroughCommentPattern)) {
                context.report({
                    message: "Expected a 'break' statement before '{{type}}'.",
                    data: {type: node.test ? "case" : "default"},
                    node: node
                });
            }
            fallthroughCase = null;
        },

        "SwitchCase:exit": function(node) {
            var nextToken = sourceCode.getTokenAfter(node);

            /*
             * `reachable` meant fall through because statements preceded by
             * `break`, `return`, or `throw` are unreachable.
             * And allows empty cases and the last case.
             */
            if (currentCodePath.currentSegments.some(isReachable) &&
                (node.consequent.length > 0 || hasBlankLinesBetween(node, nextToken)) &&
                lodash.last(node.parent.cases) !== node) {
                fallthroughCase = node;
            }
        }
    };
}

};

},{“lodash”:108}],229:[function(require,module,exports){ /**

* @fileoverview Rule to flag use of a leading/trailing decimal point in a numeric literal
* @author James Allardice
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow leading or trailing decimal points in numeric literals",
        category: "Best Practices",
        recommended: false
    },

    schema: []
},

create: function(context) {

    return {
        Literal: function(node) {

            if (typeof node.value === "number") {
                if (node.raw.indexOf(".") === 0) {
                    context.report(node, "A leading decimal point can be confused with a dot.");
                }
                if (node.raw.indexOf(".") === node.raw.length - 1) {
                    context.report(node, "A trailing decimal point can be confused with a dot.");
                }
            }
        }
    };

}

};

},{}],230:[function(require,module,exports){ /**

* @fileoverview Rule to flag use of function declaration identifiers as variables.
* @author Ian Christian Myers
*/

“use strict”;

var astUtils = require(“../ast-utils”);

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow reassigning `function` declarations",
        category: "Possible Errors",
        recommended: true
    },

    schema: []
},

create: function(context) {

    /**
     * Reports a reference if is non initializer and writable.
     * @param {References} references - Collection of reference to check.
     * @returns {void}
     */
    function checkReference(references) {
        astUtils.getModifyingReferences(references).forEach(function(reference) {
            context.report(
                reference.identifier,
                "'{{name}}' is a function.",
                {name: reference.identifier.name});
        });
    }

    /**
     * Finds and reports references that are non initializer and writable.
     * @param {Variable} variable - A variable to check.
     * @returns {void}
     */
    function checkVariable(variable) {
        if (variable.defs[0].type === "FunctionName") {
            checkReference(variable.references);
        }
    }

    /**
     * Checks parameters of a given function node.
     * @param {ASTNode} node - A function node to check.
     * @returns {void}
     */
    function checkForFunction(node) {
        context.getDeclaredVariables(node).forEach(checkVariable);
    }

    return {
        FunctionDeclaration: checkForFunction,
        FunctionExpression: checkForFunction
    };
}

};

},{“../ast-utils”:124}],231:[function(require,module,exports){ /**

* @fileoverview A rule to disallow the type conversions with shorter notations.
* @author Toru Nagashima
*/

“use strict”;

//—————————————————————————— // Helpers //——————————————————————————

var INDEX_OF_PATTERN = /^(?:i|lastI)ndexOf$/; var ALLOWABLE_OPERATORS = [“~”, “!!”, “+”, “*”];

/**

* Parses and normalizes an option object.
* @param {object} options - An option object to parse.
* @returns {object} The parsed and normalized option object.
*/

function parseOptions(options) {

options = options || {};
return {
    boolean: "boolean" in options ? Boolean(options.boolean) : true,
    number: "number" in options ? Boolean(options.number) : true,
    string: "string" in options ? Boolean(options.string) : true,
    allow: options.allow || []
};

}

/**

* Checks whether or not a node is a double logical nigating.
* @param {ASTNode} node - An UnaryExpression node to check.
* @returns {boolean} Whether or not the node is a double logical nigating.
*/

function isDoubleLogicalNegating(node) {

return (
    node.operator === "!" &&
    node.argument.type === "UnaryExpression" &&
    node.argument.operator === "!"
);

}

/**

* Checks whether or not a node is a binary negating of `.indexOf()` method calling.
* @param {ASTNode} node - An UnaryExpression node to check.
* @returns {boolean} Whether or not the node is a binary negating of `.indexOf()` method calling.
*/

function isBinaryNegatingOfIndexOf(node) {

return (
    node.operator === "~" &&
    node.argument.type === "CallExpression" &&
    node.argument.callee.type === "MemberExpression" &&
    node.argument.callee.property.type === "Identifier" &&
    INDEX_OF_PATTERN.test(node.argument.callee.property.name)
);

}

/**

* Checks whether or not a node is a multiplying by one.
* @param {BinaryExpression} node - A BinaryExpression node to check.
* @returns {boolean} Whether or not the node is a multiplying by one.
*/

function isMultiplyByOne(node) {

return node.operator === "*" && (
    node.left.type === "Literal" && node.left.value === 1 ||
    node.right.type === "Literal" && node.right.value === 1
);

}

/**

* Checks whether the result of a node is numeric or not
* @param {ASTNode} node The node to test
* @returns {boolean} true if the node is a number literal or a `Number()`, `parseInt` or `parseFloat` call
*/

function isNumeric(node) {

return (
    node.type === "Literal" && typeof node.value === "number" ||
    node.type === "CallExpression" && (
        node.callee.name === "Number" ||
        node.callee.name === "parseInt" ||
        node.callee.name === "parseFloat"
    )
);

}

/**

* Returns the first non-numeric operand in a BinaryExpression. Designed to be
* used from bottom to up since it walks up the BinaryExpression trees using
* node.parent to find the result.
* @param {BinaryExpression} node The BinaryExpression node to be walked up on
* @returns {ASTNode|null} The first non-numeric item in the BinaryExpression tree or null
*/

function getNonNumericOperand(node) {

var left = node.left,
    right = node.right;

if (right.type !== "BinaryExpression" && !isNumeric(right)) {
    return right;
}

if (left.type !== "BinaryExpression" && !isNumeric(left)) {
    return left;
}

return null;

}

/**

* Checks whether or not a node is a concatenating with an empty string.
* @param {ASTNode} node - A BinaryExpression node to check.
* @returns {boolean} Whether or not the node is a concatenating with an empty string.
*/

function isConcatWithEmptyString(node) {

return node.operator === "+" && (
    (node.left.type === "Literal" && node.left.value === "") ||
    (node.right.type === "Literal" && node.right.value === "")
);

}

/**

* Checks whether or not a node is appended with an empty string.
* @param {ASTNode} node - An AssignmentExpression node to check.
* @returns {boolean} Whether or not the node is appended with an empty string.
*/

function isAppendEmptyString(node) {

return node.operator === "+=" && node.right.type === "Literal" && node.right.value === "";

}

/**

* Gets a node that is the left or right operand of a node, is not the specified literal.
* @param {ASTNode} node - A BinaryExpression node to get.
* @param {any} value - A literal value to check.
* @returns {ASTNode} A node that is the left or right operand of the node, is not the specified literal.
*/

function getOtherOperand(node, value) {

if (node.left.type === "Literal" && node.left.value === value) {
    return node.right;
}
return node.left;

}

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow shorthand type conversions",
        category: "Best Practices",
        recommended: false
    },

    schema: [{
        type: "object",
        properties: {
            boolean: {
                type: "boolean"
            },
            number: {
                type: "boolean"
            },
            string: {
                type: "boolean"
            },
            allow: {
                type: "array",
                items: {
                    enum: ALLOWABLE_OPERATORS
                },
                uniqueItems: true
            }
        },
        additionalProperties: false
    }]
},

create: function(context) {
    var options = parseOptions(context.options[0]),
        operatorAllowed = false;

    var sourceCode = context.getSourceCode();

    return {
        UnaryExpression: function(node) {

            // !!foo
            operatorAllowed = options.allow.indexOf("!!") >= 0;
            if (!operatorAllowed && options.boolean && isDoubleLogicalNegating(node)) {
                context.report(
                    node,
                    "use `Boolean({{code}})` instead.", {
                        code: sourceCode.getText(node.argument.argument)
                    });
            }

            // ~foo.indexOf(bar)
            operatorAllowed = options.allow.indexOf("~") >= 0;
            if (!operatorAllowed && options.boolean && isBinaryNegatingOfIndexOf(node)) {
                context.report(
                    node,
                    "use `{{code}} !== -1` instead.", {
                        code: sourceCode.getText(node.argument)
                    });
            }

            // +foo
            operatorAllowed = options.allow.indexOf("+") >= 0;
            if (!operatorAllowed && options.number && node.operator === "+" && !isNumeric(node.argument)) {
                context.report(
                    node,
                    "use `Number({{code}})` instead.", {
                        code: sourceCode.getText(node.argument)
                    });
            }
        },

        // Use `:exit` to prevent double reporting
        "BinaryExpression:exit": function(node) {

            // 1 * foo
            operatorAllowed = options.allow.indexOf("*") >= 0;
            var nonNumericOperand = !operatorAllowed && options.number && isMultiplyByOne(node) && getNonNumericOperand(node);

            if (nonNumericOperand) {
                context.report(
                    node,
                    "use `Number({{code}})` instead.", {
                        code: sourceCode.getText(nonNumericOperand)
                    });
            }

            // "" + foo
            operatorAllowed = options.allow.indexOf("+") >= 0;
            if (!operatorAllowed && options.string && isConcatWithEmptyString(node)) {
                context.report(
                    node,
                    "use `String({{code}})` instead.", {
                        code: sourceCode.getText(getOtherOperand(node, ""))
                    });
            }
        },

        AssignmentExpression: function(node) {

            // foo += ""
            operatorAllowed = options.allow.indexOf("+") >= 0;
            if (options.string && isAppendEmptyString(node)) {
                context.report(
                    node,
                    "use `{{code}} = String({{code}})` instead.", {
                        code: sourceCode.getText(getOtherOperand(node, ""))
                    });
            }
        }
    };
}

};

},{}],232:[function(require,module,exports){ /**

* @fileoverview Rule to check for implicit global variables and functions.
* @author Joshua Peek
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow `var` and named `function` declarations in the global scope",
        category: "Best Practices",
        recommended: false
    },

    schema: []
},

create: function(context) {
    return {
        Program: function() {
            var scope = context.getScope();

            scope.variables.forEach(function(variable) {
                if (variable.writeable) {
                    return;
                }

                variable.defs.forEach(function(def) {
                    if (def.type === "FunctionName" || (def.type === "Variable" && def.parent.kind === "var")) {
                        context.report(def.node, "Implicit global variable, assign as global property instead.");
                    }
                });
            });

            scope.implicit.variables.forEach(function(variable) {
                var scopeVariable = scope.set.get(variable.name);

                if (scopeVariable && scopeVariable.writeable) {
                    return;
                }

                variable.defs.forEach(function(def) {
                    context.report(def.node, "Implicit global variable, assign as global property instead.");
                });
            });
        }
    };

}

};

},{}],233:[function(require,module,exports){ /**

* @fileoverview Rule to flag use of implied eval via setTimeout and setInterval
* @author James Allardice
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow the use of `eval()`-like methods",
        category: "Best Practices",
        recommended: false
    },

    schema: []
},

create: function(context) {
    var CALLEE_RE = /set(?:Timeout|Interval)|execScript/;

    /*
     * Figures out if we should inspect a given binary expression. Is a stack
     * of stacks, where the first element in each substack is a CallExpression.
     */
    var impliedEvalAncestorsStack = [];

    //--------------------------------------------------------------------------
    // Helpers
    //--------------------------------------------------------------------------

    /**
     * Get the last element of an array, without modifying arr, like pop(), but non-destructive.
     * @param {array} arr What to inspect
     * @returns {*} The last element of arr
     * @private
     */
    function last(arr) {
        return arr ? arr[arr.length - 1] : null;
    }

    /**
     * Checks if the given MemberExpression node is a potentially implied eval identifier on window.
     * @param {ASTNode} node The MemberExpression node to check.
     * @returns {boolean} Whether or not the given node is potentially an implied eval.
     * @private
     */
    function isImpliedEvalMemberExpression(node) {
        var object = node.object,
            property = node.property,
            hasImpliedEvalName = CALLEE_RE.test(property.name) || CALLEE_RE.test(property.value);

        return object.name === "window" && hasImpliedEvalName;
    }

    /**
     * Determines if a node represents a call to a potentially implied eval.
     *
     * This checks the callee name and that there's an argument, but not the type of the argument.
     *
     * @param {ASTNode} node The CallExpression to check.
     * @returns {boolean} True if the node matches, false if not.
     * @private
     */
    function isImpliedEvalCallExpression(node) {
        var isMemberExpression = (node.callee.type === "MemberExpression"),
            isIdentifier = (node.callee.type === "Identifier"),
            isImpliedEvalCallee =
                (isIdentifier && CALLEE_RE.test(node.callee.name)) ||
                (isMemberExpression && isImpliedEvalMemberExpression(node.callee));

        return isImpliedEvalCallee && node.arguments.length;
    }

    /**
     * Checks that the parent is a direct descendent of an potential implied eval CallExpression, and if the parent is a CallExpression, that we're the first argument.
     * @param {ASTNode} node The node to inspect the parent of.
     * @returns {boolean} Was the parent a direct descendent, and is the child therefore potentially part of a dangerous argument?
     * @private
     */
    function hasImpliedEvalParent(node) {

        // make sure our parent is marked
        return node.parent === last(last(impliedEvalAncestorsStack)) &&

            // if our parent is a CallExpression, make sure we're the first argument
            (node.parent.type !== "CallExpression" || node === node.parent.arguments[0]);
    }

    /**
     * Checks if our parent is marked as part of an implied eval argument. If
     * so, collapses the top of impliedEvalAncestorsStack and reports on the
     * original CallExpression.
     * @param {ASTNode} node The CallExpression to check.
     * @returns {boolean} True if the node matches, false if not.
     * @private
     */
    function checkString(node) {
        if (hasImpliedEvalParent(node)) {

            // remove the entire substack, to avoid duplicate reports
            var substack = impliedEvalAncestorsStack.pop();

            context.report(substack[0], "Implied eval. Consider passing a function instead of a string.");
        }
    }

    //--------------------------------------------------------------------------
    // Public
    //--------------------------------------------------------------------------

    return {
        CallExpression: function(node) {
            if (isImpliedEvalCallExpression(node)) {

                // call expressions create a new substack
                impliedEvalAncestorsStack.push([node]);
            }
        },

        "CallExpression:exit": function(node) {
            if (node === last(last(impliedEvalAncestorsStack))) {

                /* Destroys the entire sub-stack, rather than just using
                 * last(impliedEvalAncestorsStack).pop(), as a CallExpression is
                 * always the bottom of a impliedEvalAncestorsStack substack.
                 */
                impliedEvalAncestorsStack.pop();
            }
        },

        BinaryExpression: function(node) {
            if (node.operator === "+" && hasImpliedEvalParent(node)) {
                last(impliedEvalAncestorsStack).push(node);
            }
        },

        "BinaryExpression:exit": function(node) {
            if (node === last(last(impliedEvalAncestorsStack))) {
                last(impliedEvalAncestorsStack).pop();
            }
        },

        Literal: function(node) {
            if (typeof node.value === "string") {
                checkString(node);
            }
        },

        TemplateLiteral: function(node) {
            checkString(node);
        }
    };

}

};

},{}],234:[function(require,module,exports){ /**

* @fileoverview Enforces or disallows inline comments.
* @author Greg Cochard
*/

“use strict”;

var astUtils = require(“../ast-utils”);

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow inline comments after code",
        category: "Stylistic Issues",
        recommended: false
    },

    schema: []
},

create: function(context) {
    var sourceCode = context.getSourceCode();

    /**
     * Will check that comments are not on lines starting with or ending with code
     * @param {ASTNode} node The comment node to check
     * @private
     * @returns {void}
     */
    function testCodeAroundComment(node) {

        // Get the whole line and cut it off at the start of the comment
        var startLine = String(sourceCode.lines[node.loc.start.line - 1]);
        var endLine = String(sourceCode.lines[node.loc.end.line - 1]);

        var preamble = startLine.slice(0, node.loc.start.column).trim();

        // Also check after the comment
        var postamble = endLine.slice(node.loc.end.column).trim();

        // Check that this comment isn't an ESLint directive
        var isDirective = astUtils.isDirectiveComment(node);

        // Should be empty if there was only whitespace around the comment
        if (!isDirective && (preamble || postamble)) {
            context.report(node, "Unexpected comment inline with code.");
        }
    }

    //--------------------------------------------------------------------------
    // Public
    //--------------------------------------------------------------------------

    return {

        LineComment: testCodeAroundComment,
        BlockComment: testCodeAroundComment

    };
}

};

},{“../ast-utils”:124}],235:[function(require,module,exports){ /**

* @fileoverview Rule to enforce declarations in program or function body root.
* @author Brandon Mills
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow `function` or `var` declarations in nested blocks",
        category: "Possible Errors",
        recommended: true
    },

    schema: [
        {
            enum: ["functions", "both"]
        }
    ]
},

create: function(context) {

    /**
     * Find the nearest Program or Function ancestor node.
     * @returns {Object} Ancestor's type and distance from node.
     */
    function nearestBody() {
        var ancestors = context.getAncestors(),
            ancestor = ancestors.pop(),
            generation = 1;

        while (ancestor && ["Program", "FunctionDeclaration",
                "FunctionExpression", "ArrowFunctionExpression"
                ].indexOf(ancestor.type) < 0) {
            generation += 1;
            ancestor = ancestors.pop();
        }

        return {

            // Type of containing ancestor
            type: ancestor.type,

            // Separation between ancestor and node
            distance: generation
        };
    }

    /**
     * Ensure that a given node is at a program or function body's root.
     * @param {ASTNode} node Declaration node to check.
     * @returns {void}
     */
    function check(node) {
        var body = nearestBody(node),
            valid = ((body.type === "Program" && body.distance === 1) ||
                body.distance === 2);

        if (!valid) {
            context.report(node, "Move {{type}} declaration to {{body}} root.",
                {
                    type: (node.type === "FunctionDeclaration" ?
                        "function" : "variable"),
                    body: (body.type === "Program" ?
                        "program" : "function body")
                }
            );
        }
    }

    return {

        FunctionDeclaration: check,
        VariableDeclaration: function(node) {
            if (context.options[0] === "both" && node.kind === "var") {
                check(node);
            }
        }

    };

}

};

},{}],236:[function(require,module,exports){ /**

* @fileoverview Validate strings passed to the RegExp constructor
* @author Michael Ficarra
*/

“use strict”;

//—————————————————————————— // Requirements //——————————————————————————

var espree = require(“espree”);

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow invalid regular expression strings in `RegExp` constructors",
        category: "Possible Errors",
        recommended: true
    },

    schema: [{
        type: "object",
        properties: {
            allowConstructorFlags: {
                type: "array",
                items: {
                    type: "string"
                }
            }
        },
        additionalProperties: false
    }]
},

create: function(context) {

    var options = context.options[0],
        allowedFlags = "";

    if (options && options.allowConstructorFlags) {
        allowedFlags = options.allowConstructorFlags.join("");
    }

    /**
     * Check if node is a string
     * @param {ASTNode} node node to evaluate
     * @returns {boolean} True if its a string
     * @private
     */
    function isString(node) {
        return node && node.type === "Literal" && typeof node.value === "string";
    }

    /**
     * Validate strings passed to the RegExp constructor
     * @param {ASTNode} node node to evaluate
     * @returns {void}
     * @private
     */
    function check(node) {
        if (node.callee.type === "Identifier" && node.callee.name === "RegExp" && isString(node.arguments[0])) {
            var flags = isString(node.arguments[1]) ? node.arguments[1].value : "";

            if (allowedFlags) {
                flags = flags.replace(new RegExp("[" + allowedFlags + "]", "gi"), "");
            }

            try {
                void new RegExp(node.arguments[0].value);
            } catch (e) {
                context.report(node, e.message);
            }

            if (flags) {

                try {
                    espree.parse("/./" + flags, context.parserOptions);
                } catch (ex) {
                    context.report(node, "Invalid flags supplied to RegExp constructor '" + flags + "'");
                }
            }

        }
    }

    return {
        CallExpression: check,
        NewExpression: check
    };

}

};

},{“espree”:“espree”}],237:[function(require,module,exports){ /**

* @fileoverview A rule to disallow `this` keywords outside of classes or class-like objects.
* @author Toru Nagashima
*/

“use strict”;

//—————————————————————————— // Requirements //——————————————————————————

var astUtils = require(“../ast-utils”);

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow `this` keywords outside of classes or class-like objects",
        category: "Best Practices",
        recommended: false
    },

    schema: []
},

create: function(context) {
    var stack = [],
        sourceCode = context.getSourceCode();

    /**
     * Gets the current checking context.
     *
     * The return value has a flag that whether or not `this` keyword is valid.
     * The flag is initialized when got at the first time.
     *
     * @returns {{valid: boolean}}
     *   an object which has a flag that whether or not `this` keyword is valid.
     */
    stack.getCurrent = function() {
        var current = this[this.length - 1];

        if (!current.init) {
            current.init = true;
            current.valid = !astUtils.isDefaultThisBinding(
                current.node,
                sourceCode);
        }
        return current;
    };

    /**
     * Pushs new checking context into the stack.
     *
     * The checking context is not initialized yet.
     * Because most functions don't have `this` keyword.
     * When `this` keyword was found, the checking context is initialized.
     *
     * @param {ASTNode} node - A function node that was entered.
     * @returns {void}
     */
    function enterFunction(node) {

        // `this` can be invalid only under strict mode.
        stack.push({
            init: !context.getScope().isStrict,
            node: node,
            valid: true
        });
    }

    /**
     * Pops the current checking context from the stack.
     * @returns {void}
     */
    function exitFunction() {
        stack.pop();
    }

    return {

        /*
         * `this` is invalid only under strict mode.
         * Modules is always strict mode.
         */
        Program: function(node) {
            var scope = context.getScope(),
                features = context.parserOptions.ecmaFeatures || {};

            stack.push({
                init: true,
                node: node,
                valid: !(
                    scope.isStrict ||
                    node.sourceType === "module" ||
                    (features.globalReturn && scope.childScopes[0].isStrict)
                )
            });
        },

        "Program:exit": function() {
            stack.pop();
        },

        FunctionDeclaration: enterFunction,
        "FunctionDeclaration:exit": exitFunction,
        FunctionExpression: enterFunction,
        "FunctionExpression:exit": exitFunction,

        // Reports if `this` of the current context is invalid.
        ThisExpression: function(node) {
            var current = stack.getCurrent();

            if (current && !current.valid) {
                context.report(node, "Unexpected 'this'.");
            }
        }
    };
}

};

},{“../ast-utils”:124}],238:[function(require,module,exports){ /**

* @fileoverview Rule to disalow whitespace that is not a tab or space, whitespace inside strings and comments are allowed
* @author Jonathan Kingston
* @author Christophe Porteneuve
*/

“use strict”;

//—————————————————————————— // Constants //——————————————————————————

var ALL_IRREGULARS = /[fvu0085u00A0ufeffu00a0u1680u180eu2000u2001u2002u2003u2004u2005u2006u2007u2008u2009u200au200bu202fu205fu3000u2028u2029]/; var IRREGULAR_WHITESPACE = /[fvu0085u00A0ufeffu00a0u1680u180eu2000u2001u2002u2003u2004u2005u2006u2007u2008u2009u200au200bu202fu205fu3000]+/mg; var IRREGULAR_LINE_TERMINATORS = /[u2028u2029]/mg; var LINE_BREAK = /rn|r|n|u2028|u2029/g;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow irregular whitespace outside of strings and comments",
        category: "Possible Errors",
        recommended: true
    },

    schema: [
        {
            type: "object",
            properties: {
                skipComments: {
                    type: "boolean"
                },
                skipStrings: {
                    type: "boolean"
                },
                skipTemplates: {
                    type: "boolean"
                },
                skipRegExps: {
                    type: "boolean"
                }
            },
            additionalProperties: false
        }
    ]
},

create: function(context) {

    // Module store of errors that we have found
    var errors = [];

    // Comment nodes.  We accumulate these as we go, so we can be sure to trigger them after the whole `Program` entity is parsed, even for top-of-file comments.
    var commentNodes = [];

    // Lookup the `skipComments` option, which defaults to `false`.
    var options = context.options[0] || {};
    var skipComments = !!options.skipComments;
    var skipStrings = options.skipStrings !== false;
    var skipRegExps = !!options.skipRegExps;
    var skipTemplates = !!options.skipTemplates;

    var sourceCode = context.getSourceCode();

    /**
     * Removes errors that occur inside a string node
     * @param {ASTNode} node to check for matching errors.
     * @returns {void}
     * @private
     */
    function removeWhitespaceError(node) {
        var locStart = node.loc.start;
        var locEnd = node.loc.end;

        errors = errors.filter(function(error) {
            var errorLoc = error[1];

            if (errorLoc.line >= locStart.line && errorLoc.line <= locEnd.line) {
                if (errorLoc.column >= locStart.column && (errorLoc.column <= locEnd.column || errorLoc.line < locEnd.line)) {
                    return false;
                }
            }
            return true;
        });
    }

    /**
     * Checks identifier or literal nodes for errors that we are choosing to ignore and calls the relevant methods to remove the errors
     * @param {ASTNode} node to check for matching errors.
     * @returns {void}
     * @private
     */
    function removeInvalidNodeErrorsInIdentifierOrLiteral(node) {
        var shouldCheckStrings = skipStrings && (typeof node.value === "string");
        var shouldCheckRegExps = skipRegExps && (node.value instanceof RegExp);

        if (shouldCheckStrings || shouldCheckRegExps) {

            // If we have irregular characters remove them from the errors list
            if (ALL_IRREGULARS.test(node.raw)) {
                removeWhitespaceError(node);
            }
        }
    }

    /**
     * Checks template string literal nodes for errors that we are choosing to ignore and calls the relevant methods to remove the errors
     * @param {ASTNode} node to check for matching errors.
     * @returns {void}
     * @private
     */
    function removeInvalidNodeErrorsInTemplateLiteral(node) {
        if (typeof node.value.raw === "string") {
            if (ALL_IRREGULARS.test(node.value.raw)) {
                removeWhitespaceError(node);
            }
        }
    }

    /**
     * Checks comment nodes for errors that we are choosing to ignore and calls the relevant methods to remove the errors
     * @param {ASTNode} node to check for matching errors.
     * @returns {void}
     * @private
     */
    function removeInvalidNodeErrorsInComment(node) {
        if (ALL_IRREGULARS.test(node.value)) {
            removeWhitespaceError(node);
        }
    }

    /**
     * Checks the program source for irregular whitespace
     * @param {ASTNode} node The program node
     * @returns {void}
     * @private
     */
    function checkForIrregularWhitespace(node) {
        var sourceLines = sourceCode.lines;

        sourceLines.forEach(function(sourceLine, lineIndex) {
            var lineNumber = lineIndex + 1,
                location,
                match;

            while ((match = IRREGULAR_WHITESPACE.exec(sourceLine)) !== null) {
                location = {
                    line: lineNumber,
                    column: match.index
                };

                errors.push([node, location, "Irregular whitespace not allowed"]);
            }
        });
    }

    /**
     * Checks the program source for irregular line terminators
     * @param {ASTNode} node The program node
     * @returns {void}
     * @private
     */
    function checkForIrregularLineTerminators(node) {
        var source = sourceCode.getText(),
            sourceLines = sourceCode.lines,
            linebreaks = source.match(LINE_BREAK),
            lastLineIndex = -1,
            lineIndex,
            location,
            match;

        while ((match = IRREGULAR_LINE_TERMINATORS.exec(source)) !== null) {
            lineIndex = linebreaks.indexOf(match[0], lastLineIndex + 1) || 0;

            location = {
                line: lineIndex + 1,
                column: sourceLines[lineIndex].length
            };

            errors.push([node, location, "Irregular whitespace not allowed"]);
            lastLineIndex = lineIndex;
        }
    }

    /**
     * Stores a comment node (`LineComment` or `BlockComment`) for later stripping of errors within; a necessary deferring of processing to deal with top-of-file comments.
     * @param {ASTNode} node The comment node
     * @returns {void}
     * @private
     */
    function rememberCommentNode(node) {
        commentNodes.push(node);
    }

    /**
     * A no-op function to act as placeholder for comment accumulation when the `skipComments` option is `false`.
     * @returns {void}
     * @private
     */
    function noop() {}

    var nodes = {};

    if (ALL_IRREGULARS.test(sourceCode.getText())) {
        nodes.Program = function(node) {

            /*
             * As we can easily fire warnings for all white space issues with
             * all the source its simpler to fire them here.
             * This means we can check all the application code without having
             * to worry about issues caused in the parser tokens.
             * When writing this code also evaluating per node was missing out
             * connecting tokens in some cases.
             * We can later filter the errors when they are found to be not an
             * issue in nodes we don't care about.
             */

            checkForIrregularWhitespace(node);
            checkForIrregularLineTerminators(node);
        };

        nodes.Identifier = removeInvalidNodeErrorsInIdentifierOrLiteral;
        nodes.Literal = removeInvalidNodeErrorsInIdentifierOrLiteral;
        nodes.TemplateElement = skipTemplates ? removeInvalidNodeErrorsInTemplateLiteral : noop;
        nodes.LineComment = skipComments ? rememberCommentNode : noop;
        nodes.BlockComment = skipComments ? rememberCommentNode : noop;
        nodes["Program:exit"] = function() {

            if (skipComments) {

                // First strip errors occurring in comment nodes.  We have to do this post-`Program` to deal with top-of-file comments.
                commentNodes.forEach(removeInvalidNodeErrorsInComment);
            }

            // If we have any errors remaining report on them
            errors.forEach(function(error) {
                context.report.apply(context, error);
            });
        };
    } else {
        nodes.Program = noop;
    }

    return nodes;
}

};

},{}],239:[function(require,module,exports){ /**

* @fileoverview Rule to flag usage of __iterator__ property
* @author Ian Christian Myers
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow the use of the `__iterator__` property",
        category: "Best Practices",
        recommended: false
    },

    schema: []
},

create: function(context) {

    return {

        MemberExpression: function(node) {

            if (node.property &&
                    (node.property.type === "Identifier" && node.property.name === "__iterator__" && !node.computed) ||
                    (node.property.type === "Literal" && node.property.value === "__iterator__")) {
                context.report(node, "Reserved name '__iterator__'.");
            }
        }
    };

}

};

},{}],240:[function(require,module,exports){ /**

* @fileoverview Rule to flag labels that are the same as an identifier
* @author Ian Christian Myers
*/

“use strict”;

//—————————————————————————— // Requirements //——————————————————————————

var astUtils = require(“../ast-utils”);

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow labels that share a name with a variable",
        category: "Variables",
        recommended: false
    },

    schema: []
},

create: function(context) {

    //--------------------------------------------------------------------------
    // Helpers
    //--------------------------------------------------------------------------

    /**
     * Check if the identifier is present inside current scope
     * @param {object} scope current scope
     * @param {string} name To evaluate
     * @returns {boolean} True if its present
     * @private
     */
    function findIdentifier(scope, name) {
        return astUtils.getVariableByName(scope, name) !== null;
    }

    //--------------------------------------------------------------------------
    // Public API
    //--------------------------------------------------------------------------

    return {

        LabeledStatement: function(node) {

            // Fetch the innermost scope.
            var scope = context.getScope();

            // Recursively find the identifier walking up the scope, starting
            // with the innermost scope.
            if (findIdentifier(scope, node.label.name)) {
                context.report(node, "Found identifier with same name as label.");
            }
        }

    };

}

};

},{“../ast-utils”:124}],241:[function(require,module,exports){ /**

* @fileoverview Disallow Labeled Statements
* @author Nicholas C. Zakas
*/

“use strict”;

//—————————————————————————— // Constants //——————————————————————————

var LOOP_TYPES = /^(?:While|DoWhile|For|ForIn|ForOf)Statement$/;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow labeled statements",
        category: "Best Practices",
        recommended: false
    },

    schema: [
        {
            type: "object",
            properties: {
                allowLoop: {
                    type: "boolean"
                },
                allowSwitch: {
                    type: "boolean"
                }
            },
            additionalProperties: false
        }
    ]
},

create: function(context) {
    var options = context.options[0];
    var allowLoop = Boolean(options && options.allowLoop);
    var allowSwitch = Boolean(options && options.allowSwitch);
    var scopeInfo = null;

    /**
     * Gets the kind of a given node.
     *
     * @param {ASTNode} node - A node to get.
     * @returns {string} The kind of the node.
     */
    function getBodyKind(node) {
        var type = node.type;

        if (LOOP_TYPES.test(type)) {
            return "loop";
        }
        if (type === "SwitchStatement") {
            return "switch";
        }
        return "other";
    }

    /**
     * Checks whether the label of a given kind is allowed or not.
     *
     * @param {string} kind - A kind to check.
     * @returns {boolean} `true` if the kind is allowed.
     */
    function isAllowed(kind) {
        switch (kind) {
            case "loop": return allowLoop;
            case "switch": return allowSwitch;
            default: return false;
        }
    }

    /**
     * Checks whether a given name is a label of a loop or not.
     *
     * @param {string} label - A name of a label to check.
     * @returns {boolean} `true` if the name is a label of a loop.
     */
    function getKind(label) {
        var info = scopeInfo;

        while (info) {
            if (info.label === label) {
                return info.kind;
            }
            info = info.upper;
        }

        /* istanbul ignore next: syntax error */
        return "other";
    }

    //--------------------------------------------------------------------------
    // Public
    //--------------------------------------------------------------------------

    return {
        LabeledStatement: function(node) {
            scopeInfo = {
                label: node.label.name,
                kind: getBodyKind(node.body),
                upper: scopeInfo
            };
        },

        "LabeledStatement:exit": function(node) {
            if (!isAllowed(scopeInfo.kind)) {
                context.report({
                    node: node,
                    message: "Unexpected labeled statement."
                });
            }

            scopeInfo = scopeInfo.upper;
        },

        BreakStatement: function(node) {
            if (node.label && !isAllowed(getKind(node.label.name))) {
                context.report({
                    node: node,
                    message: "Unexpected label in break statement."
                });
            }
        },

        ContinueStatement: function(node) {
            if (node.label && !isAllowed(getKind(node.label.name))) {
                context.report({
                    node: node,
                    message: "Unexpected label in continue statement."
                });
            }
        }
    };

}

};

},{}],242:[function(require,module,exports){ /**

* @fileoverview Rule to flag blocks with no reason to exist
* @author Brandon Mills
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow unnecessary nested blocks",
        category: "Best Practices",
        recommended: false
    },

    schema: []
},

create: function(context) {

    // A stack of lone blocks to be checked for block-level bindings
    var loneBlocks = [],
        ruleDef;

    /**
     * Reports a node as invalid.
     * @param {ASTNode} node - The node to be reported.
     * @returns {void}
    */
    function report(node) {
        var parent = context.getAncestors().pop();

        context.report(node, parent.type === "Program" ?
            "Block is redundant." :
            "Nested block is redundant."
        );
    }

    /**
     * Checks for any ocurrence of BlockStatement > BlockStatement or Program > BlockStatement
     * @returns {boolean} True if the current node is a lone block.
    */
    function isLoneBlock() {
        var parent = context.getAncestors().pop();

        return parent.type === "BlockStatement" || parent.type === "Program";
    }

    /**
     * Checks the enclosing block of the current node for block-level bindings,
     * and "marks it" as valid if any.
     * @returns {void}
    */
    function markLoneBlock() {
        if (loneBlocks.length === 0) {
            return;
        }

        var block = context.getAncestors().pop();

        if (loneBlocks[loneBlocks.length - 1] === block) {
            loneBlocks.pop();
        }
    }

    // Default rule definition: report all lone blocks
    ruleDef = {
        BlockStatement: function(node) {
            if (isLoneBlock(node)) {
                report(node);
            }
        }
    };

    // ES6: report blocks without block-level bindings
    if (context.parserOptions.ecmaVersion >= 6) {
        ruleDef = {
            BlockStatement: function(node) {
                if (isLoneBlock(node)) {
                    loneBlocks.push(node);
                }
            },
            "BlockStatement:exit": function(node) {
                if (loneBlocks.length > 0 && loneBlocks[loneBlocks.length - 1] === node) {
                    loneBlocks.pop();
                    report(node);
                }
            }
        };

        ruleDef.VariableDeclaration = function(node) {
            if (node.kind === "let" || node.kind === "const") {
                markLoneBlock(node);
            }
        };

        ruleDef.FunctionDeclaration = function(node) {
            if (context.getScope().isStrict) {
                markLoneBlock(node);
            }
        };

        ruleDef.ClassDeclaration = markLoneBlock;
    }

    return ruleDef;
}

};

},{}],243:[function(require,module,exports){ /**

* @fileoverview Rule to disallow if as the only statmenet in an else block
* @author Brandon Mills
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow `if` statements as the only statement in `else` blocks",
        category: "Stylistic Issues",
        recommended: false
    },

    schema: []
},

create: function(context) {

    return {
        IfStatement: function(node) {
            var ancestors = context.getAncestors(),
                parent = ancestors.pop(),
                grandparent = ancestors.pop();

            if (parent && parent.type === "BlockStatement" &&
                    parent.body.length === 1 && grandparent &&
                    grandparent.type === "IfStatement" &&
                    parent === grandparent.alternate) {
                context.report(node, "Unexpected if as the only statement in an else block.");
            }
        }
    };

}

};

},{}],244:[function(require,module,exports){ /**

* @fileoverview Rule to flag creation of function inside a loop
* @author Ilya Volodin
*/

“use strict”;

//—————————————————————————— // Helpers //——————————————————————————

/**

* Gets the containing loop node of a specified node.
*
* We don't need to check nested functions, so this ignores those.
* `Scope.through` contains references of nested functions.
*
* @param {ASTNode} node - An AST node to get.
* @returns {ASTNode|null} The containing loop node of the specified node, or
*      `null`.
*/

function getContainingLoopNode(node) {

var parent = node.parent;

while (parent) {
    switch (parent.type) {
        case "WhileStatement":
        case "DoWhileStatement":
            return parent;

        case "ForStatement":

            // `init` is outside of the loop.
            if (parent.init !== node) {
                return parent;
            }
            break;

        case "ForInStatement":
        case "ForOfStatement":

            // `right` is outside of the loop.
            if (parent.right !== node) {
                return parent;
            }
            break;

        case "ArrowFunctionExpression":
        case "FunctionExpression":
        case "FunctionDeclaration":

            // We don't need to check nested functions.
            return null;

        default:
            break;
    }

    node = parent;
    parent = node.parent;
}

return null;

}

/**

* Gets the containing loop node of a given node.
* If the loop was nested, this returns the most outer loop.
*
* @param {ASTNode} node - A node to get. This is a loop node.
* @param {ASTNode|null} excludedNode - A node that the result node should not
*      include.
* @returns {ASTNode} The most outer loop node.
*/

function getTopLoopNode(node, excludedNode) {

var retv = node;
var border = excludedNode ? excludedNode.range[1] : 0;

while (node && node.range[0] >= border) {
    retv = node;
    node = getContainingLoopNode(node);
}

return retv;

}

/**

* Checks whether a given reference which refers to an upper scope's variable is
* safe or not.
*
* @param {ASTNode} funcNode - A target function node.
* @param {ASTNode} loopNode - A containing loop node.
* @param {escope.Reference} reference - A reference to check.
* @returns {boolean} `true` if the reference is safe or not.
*/

function isSafe(funcNode, loopNode, reference) {

var variable = reference.resolved;
var definition = variable && variable.defs[0];
var declaration = definition && definition.parent;
var kind = (declaration && declaration.type === "VariableDeclaration")
    ? declaration.kind
    : "";

// Variables which are declared by `const` is safe.
if (kind === "const") {
    return true;
}

// Variables which are declared by `let` in the loop is safe.
// It's a different instance from the next loop step's.
if (kind === "let" &&
    declaration.range[0] > loopNode.range[0] &&
    declaration.range[1] < loopNode.range[1]
) {
    return true;
}

// WriteReferences which exist after this border are unsafe because those
// can modify the variable.
var border = getTopLoopNode(
    loopNode,
    (kind === "let") ? declaration : null
).range[0];

/**
 * Checks whether a given reference is safe or not.
 * The reference is every reference of the upper scope's variable we are
 * looking now.
 *
 * It's safeafe if the reference matches one of the following condition.
 * - is readonly.
 * - doesn't exist inside a local function and after the border.
 *
 * @param {escope.Reference} upperRef - A reference to check.
 * @returns {boolean} `true` if the reference is safe.
 */
function isSafeReference(upperRef) {
    var id = upperRef.identifier;

    return (
        !upperRef.isWrite() ||
        variable.scope.variableScope === upperRef.from.variableScope &&
        id.range[0] < border
    );
}

return Boolean(variable) && variable.references.every(isSafeReference);

}

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow `function` declarations and expressions inside loop statements",
        category: "Best Practices",
        recommended: false
    },

    schema: []
},

create: function(context) {

    /**
     * Reports functions which match the following condition:
     *
     * - has a loop node in ancestors.
     * - has any references which refers to an unsafe variable.
     *
     * @param {ASTNode} node The AST node to check.
     * @returns {boolean} Whether or not the node is within a loop.
     */
    function checkForLoops(node) {
        var loopNode = getContainingLoopNode(node);

        if (!loopNode) {
            return;
        }

        var references = context.getScope().through;

        if (references.length > 0 &&
            !references.every(isSafe.bind(null, node, loopNode))
        ) {
            context.report(node, "Don't make functions within a loop");
        }
    }

    return {
        ArrowFunctionExpression: checkForLoops,
        FunctionExpression: checkForLoops,
        FunctionDeclaration: checkForLoops
    };
}

};

},{}],245:[function(require,module,exports){ /**

* @fileoverview Rule to flag statements that use magic numbers (adapted from https://github.com/danielstjules/buddy.js)
* @author Vincent Lemeunier
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow magic numbers",
        category: "Best Practices",
        recommended: false
    },

    schema: [{
        type: "object",
        properties: {
            detectObjects: {
                type: "boolean"
            },
            enforceConst: {
                type: "boolean"
            },
            ignore: {
                type: "array",
                items: {
                    type: "number"
                },
                uniqueItems: true
            },
            ignoreArrayIndexes: {
                type: "boolean"
            }
        },
        additionalProperties: false
    }]
},

create: function(context) {
    var config = context.options[0] || {},
        detectObjects = !!config.detectObjects,
        enforceConst = !!config.enforceConst,
        ignore = config.ignore || [],
        ignoreArrayIndexes = !!config.ignoreArrayIndexes;

    /**
     * Returns whether the node is number literal
     * @param {Node} node - the node literal being evaluated
     * @returns {boolean} true if the node is a number literal
     */
    function isNumber(node) {
        return typeof node.value === "number";
    }

    /**
     * Returns whether the number should be ignored
     * @param {number} num - the number
     * @returns {boolean} true if the number should be ignored
     */
    function shouldIgnoreNumber(num) {
        return ignore.indexOf(num) !== -1;
    }

    /**
     * Returns whether the number should be ignored when used as a radix within parseInt() or Number.parseInt()
     * @param {ASTNode} parent - the non-"UnaryExpression" parent
     * @param {ASTNode} node - the node literal being evaluated
     * @returns {boolean} true if the number should be ignored
     */
    function shouldIgnoreParseInt(parent, node) {
        return parent.type === "CallExpression" && node === parent.arguments[1] &&
            (parent.callee.name === "parseInt" ||
            parent.callee.type === "MemberExpression" &&
            parent.callee.object.name === "Number" &&
            parent.callee.property.name === "parseInt");
    }

    /**
     * Returns whether the number should be ignored when used to define a JSX prop
     * @param {ASTNode} parent - the non-"UnaryExpression" parent
     * @returns {boolean} true if the number should be ignored
     */
    function shouldIgnoreJSXNumbers(parent) {
        return parent.type.indexOf("JSX") === 0;
    }

    /**
     * Returns whether the number should be ignored when used as an array index with enabled 'ignoreArrayIndexes' option.
     * @param {ASTNode} parent - the non-"UnaryExpression" parent.
     * @returns {boolean} true if the number should be ignored
     */
    function shouldIgnoreArrayIndexes(parent) {
        return parent.type === "MemberExpression" && ignoreArrayIndexes;
    }

    return {
        Literal: function(node) {
            var parent = node.parent,
                value = node.value,
                raw = node.raw,
                okTypes = detectObjects ? [] : ["ObjectExpression", "Property", "AssignmentExpression"];

            if (!isNumber(node)) {
                return;
            }

            // For negative magic numbers: update the value and parent node
            if (parent.type === "UnaryExpression" && parent.operator === "-") {
                node = parent;
                parent = node.parent;
                value = -value;
                raw = "-" + raw;
            }

            if (shouldIgnoreNumber(value) ||
                shouldIgnoreParseInt(parent, node) ||
                shouldIgnoreArrayIndexes(parent) ||
                shouldIgnoreJSXNumbers(parent)) {
                return;
            }

            if (parent.type === "VariableDeclarator") {
                if (enforceConst && parent.parent.kind !== "const") {
                    context.report({
                        node: node,
                        message: "Number constants declarations must use 'const'"
                    });
                }
            } else if (okTypes.indexOf(parent.type) === -1 ||
                (parent.type === "AssignmentExpression" && parent.operator !== "=")) {
                context.report({
                    node: node,
                    message: "No magic number: " + raw
                });
            }
        }
    };
}

};

},{}],246:[function(require,module,exports){ /**

* @fileoverview Rule to disallow mixed binary operators.
* @author Toru Nagashima
*/

“use strict”;

//—————————————————————————— // Requirements //——————————————————————————

var astUtils = require(“../ast-utils.js”);

//—————————————————————————— // Helpers //——————————————————————————

var ARITHMETIC_OPERATORS = [“+”, “-”, “*”, “/”, “%”, “**”]; var BITWISE_OPERATORS = [“&”, “|”, “^”, “~”, “<<”, “>>”, “>>>”]; var COMPARISON_OPERATORS = [“==”, “!=”, “===”, “!==”, “>”, “>=”, “<”, “<=”]; var LOGICAL_OPERATORS = [“&&”, “||”]; var RELATIONAL_OPERATORS = [“in”, “instanceof”]; var ALL_OPERATORS = [].concat(

ARITHMETIC_OPERATORS,
BITWISE_OPERATORS,
COMPARISON_OPERATORS,
LOGICAL_OPERATORS,
RELATIONAL_OPERATORS

); var DEFAULT_GROUPS = [

ARITHMETIC_OPERATORS,
BITWISE_OPERATORS,
COMPARISON_OPERATORS,
LOGICAL_OPERATORS,
RELATIONAL_OPERATORS

]; var TARGET_NODE_TYPE = /^(?:Binary|Logical)Expression$/;

/**

* Normalizes options.
*
* @param {object|undefined} options - A options object to normalize.
* @returns {object} Normalized option object.
*/

function normalizeOptions(options) {

var hasGroups = (options && options.groups && options.groups.length > 0);
var groups = hasGroups ? options.groups : DEFAULT_GROUPS;
var allowSamePrecedence = (options && options.allowSamePrecedence) !== false;

return {
    groups: groups,
    allowSamePrecedence: allowSamePrecedence
};

}

/**

* Checks whether any group which includes both given operator exists or not.
*
* @param {Array.<string[]>} groups - A list of groups to check.
* @param {string} left - An operator.
* @param {string} right - Another operator.
* @returns {boolean} `true` if such group existed.
*/

function includesBothInAGroup(groups, left, right) {

return groups.some(function(group) {
    return group.indexOf(left) !== -1 && group.indexOf(right) !== -1;
});

}

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "Disallow mixed binary operators.",
        category: "Stylistic Issues",
        recommended: false
    },
    schema: [
        {
            type: "object",
            properties: {
                groups: {
                    type: "array",
                    items: {
                        type: "array",
                        items: {enum: ALL_OPERATORS},
                        minItems: 2,
                        uniqueItems: true
                    },
                    uniqueItems: true
                },
                allowSamePrecedence: {
                    type: "boolean"
                }
            },
            additionalProperties: false
        }
    ]
},

create: function(context) {
    var sourceCode = context.getSourceCode();
    var options = normalizeOptions(context.options[0]);

    /**
     * Checks whether a given node should be ignored by options or not.
     *
     * @param {ASTNode} node - A node to check. This is a BinaryExpression
     *      node or a LogicalExpression node. This parent node is one of
     *      them, too.
     * @returns {boolean} `true` if the node should be ignored.
     */
    function shouldIgnore(node) {
        var a = node;
        var b = node.parent;

        return (
            !includesBothInAGroup(options.groups, a.operator, b.operator) ||
            (
                options.allowSamePrecedence &&
                astUtils.getPrecedence(a) === astUtils.getPrecedence(b)
            )
        );
    }

    /**
     * Checks whether the operator of a given node is mixed with parent
     * node's operator or not.
     *
     * @param {ASTNode} node - A node to check. This is a BinaryExpression
     *      node or a LogicalExpression node. This parent node is one of
     *      them, too.
     * @returns {boolean} `true` if the node was mixed.
     */
    function isMixedWithParent(node) {
        return (
            node.operator !== node.parent.operator &&
            !astUtils.isParenthesised(sourceCode, node)
        );
    }

    /**
     * Gets the operator token of a given node.
     *
     * @param {ASTNode} node - A node to check. This is a BinaryExpression
     *      node or a LogicalExpression node.
     * @returns {Token} The operator token of the node.
     */
    function getOperatorToken(node) {
        var token = sourceCode.getTokenAfter(node.left);

        while (token.value === ")") {
            token = sourceCode.getTokenAfter(token);
        }

        return token;
    }

    /**
     * Reports both the operator of a given node and the operator of the
     * parent node.
     *
     * @param {ASTNode} node - A node to check. This is a BinaryExpression
     *      node or a LogicalExpression node. This parent node is one of
     *      them, too.
     * @returns {void}
     */
    function reportBothOperators(node) {
        var parent = node.parent;
        var left = (parent.left === node) ? node : parent;
        var right = (parent.left !== node) ? node : parent;
        var message =
            "Unexpected mix of '" + left.operator + "' and '" +
            right.operator + "'.";

        context.report({
            node: left,
            loc: getOperatorToken(left).loc.start,
            message: message
        });
        context.report({
            node: right,
            loc: getOperatorToken(right).loc.start,
            message: message
        });
    }

    /**
     * Checks between the operator of this node and the operator of the
     * parent node.
     *
     * @param {ASTNode} node - A node to check.
     * @returns {void}
     */
    function check(node) {
        if (TARGET_NODE_TYPE.test(node.parent.type) &&
            isMixedWithParent(node) &&
            !shouldIgnore(node)
        ) {
            reportBothOperators(node);
        }
    }

    return {
        BinaryExpression: check,
        LogicalExpression: check
    };
}

};

},{“../ast-utils.js”:124}],247:[function(require,module,exports){ /**

* @fileoverview Rule to enforce grouped require statements for Node.JS
* @author Raphael Pigulla
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow `require` calls to be mixed with regular `var` declarations",
        category: "Node.js and CommonJS",
        recommended: false
    },

    schema: [
        {
            oneOf: [
                {
                    type: "boolean"
                },
                {
                    type: "object",
                    properties: {
                        grouping: {
                            type: "boolean"
                        },
                        allowCall: {
                            type: "boolean"
                        }
                    },
                    additionalProperties: false
                }
            ]
        }
    ]
},

create: function(context) {

    var grouping = false,
        allowCall = false,
        options = context.options[0];

    if (typeof options === "object") {
        grouping = options.grouping;
        allowCall = options.allowCall;
    } else {
        grouping = !!options;
    }

    /**
     * Returns the list of built-in modules.
     *
     * @returns {string[]} An array of built-in Node.js modules.
     */
    function getBuiltinModules() {

        /*
         * This list is generated using:
         * `require("repl")._builtinLibs.concat('repl').sort()`
         * This particular list is as per nodejs v0.12.2 and iojs v0.7.1
         */
        return [
            "assert", "buffer", "child_process", "cluster", "crypto",
            "dgram", "dns", "domain", "events", "fs", "http", "https",
            "net", "os", "path", "punycode", "querystring", "readline",
            "repl", "smalloc", "stream", "string_decoder", "tls", "tty",
            "url", "util", "v8", "vm", "zlib"
        ];
    }

    var BUILTIN_MODULES = getBuiltinModules();

    var DECL_REQUIRE = "require",
        DECL_UNINITIALIZED = "uninitialized",
        DECL_OTHER = "other";

    var REQ_CORE = "core",
        REQ_FILE = "file",
        REQ_MODULE = "module",
        REQ_COMPUTED = "computed";

    /**
     * Determines the type of a declaration statement.
     * @param {ASTNode} initExpression The init node of the VariableDeclarator.
     * @returns {string} The type of declaration represented by the expression.
     */
    function getDeclarationType(initExpression) {
        if (!initExpression) {

            // "var x;"
            return DECL_UNINITIALIZED;
        }

        if (initExpression.type === "CallExpression" &&
            initExpression.callee.type === "Identifier" &&
            initExpression.callee.name === "require"
        ) {

            // "var x = require('util');"
            return DECL_REQUIRE;
        } else if (allowCall &&
            initExpression.type === "CallExpression" &&
            initExpression.callee.type === "CallExpression"
        ) {

            // "var x = require('diagnose')('sub-module');"
            return getDeclarationType(initExpression.callee);
        } else if (initExpression.type === "MemberExpression") {

            // "var x = require('glob').Glob;"
            return getDeclarationType(initExpression.object);
        }

        // "var x = 42;"
        return DECL_OTHER;
    }

    /**
     * Determines the type of module that is loaded via require.
     * @param {ASTNode} initExpression The init node of the VariableDeclarator.
     * @returns {string} The module type.
     */
    function inferModuleType(initExpression) {
        if (initExpression.type === "MemberExpression") {

            // "var x = require('glob').Glob;"
            return inferModuleType(initExpression.object);
        } else if (initExpression.arguments.length === 0) {

            // "var x = require();"
            return REQ_COMPUTED;
        }

        var arg = initExpression.arguments[0];

        if (arg.type !== "Literal" || typeof arg.value !== "string") {

            // "var x = require(42);"
            return REQ_COMPUTED;
        }

        if (BUILTIN_MODULES.indexOf(arg.value) !== -1) {

            // "var fs = require('fs');"
            return REQ_CORE;
        } else if (/^\.{0,2}\//.test(arg.value)) {

            // "var utils = require('./utils');"
            return REQ_FILE;
        } else {

            // "var async = require('async');"
            return REQ_MODULE;
        }
    }

    /**
     * Check if the list of variable declarations is mixed, i.e. whether it
     * contains both require and other declarations.
     * @param {ASTNode} declarations The list of VariableDeclarators.
     * @returns {boolean} True if the declarations are mixed, false if not.
     */
    function isMixed(declarations) {
        var contains = {};

        declarations.forEach(function(declaration) {
            var type = getDeclarationType(declaration.init);

            contains[type] = true;
        });

        return !!(
            contains[DECL_REQUIRE] &&
            (contains[DECL_UNINITIALIZED] || contains[DECL_OTHER])
        );
    }

    /**
     * Check if all require declarations in the given list are of the same
     * type.
     * @param {ASTNode} declarations The list of VariableDeclarators.
     * @returns {boolean} True if the declarations are grouped, false if not.
     */
    function isGrouped(declarations) {
        var found = {};

        declarations.forEach(function(declaration) {
            if (getDeclarationType(declaration.init) === DECL_REQUIRE) {
                found[inferModuleType(declaration.init)] = true;
            }
        });

        return Object.keys(found).length <= 1;
    }

    return {

        VariableDeclaration: function(node) {

            if (isMixed(node.declarations)) {
                context.report(
                    node,
                    "Do not mix 'require' and other declarations."
                );
            } else if (grouping && !isGrouped(node.declarations)) {
                context.report(
                    node,
                    "Do not mix core, module, file and computed requires."
                );
            }
        }
    };

}

};

},{}],248:[function(require,module,exports){ /**

* @fileoverview Disallow mixed spaces and tabs for indentation
* @author Jary Niebur
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow mixed spaces and tabs for indentation",
        category: "Stylistic Issues",
        recommended: true
    },

    schema: [
        {
            enum: ["smart-tabs", true, false]
        }
    ]
},

create: function(context) {
    var sourceCode = context.getSourceCode();

    var smartTabs,
        ignoredLocs = [];

    switch (context.options[0]) {
        case true: // Support old syntax, maybe add deprecation warning here
        case "smart-tabs":
            smartTabs = true;
            break;
        default:
            smartTabs = false;
    }

    /**
     * Determines if a given line and column are before a location.
     * @param {Location} loc The location object from an AST node.
     * @param {int} line The line to check.
     * @param {int} column The column to check.
     * @returns {boolean} True if the line and column are before the location, false if not.
     * @private
     */
    function beforeLoc(loc, line, column) {
        if (line < loc.start.line) {
            return true;
        }
        return line === loc.start.line && column < loc.start.column;
    }

    /**
     * Determines if a given line and column are after a location.
     * @param {Location} loc The location object from an AST node.
     * @param {int} line The line to check.
     * @param {int} column The column to check.
     * @returns {boolean} True if the line and column are after the location, false if not.
     * @private
     */
    function afterLoc(loc, line, column) {
        if (line > loc.end.line) {
            return true;
        }
        return line === loc.end.line && column > loc.end.column;
    }

    //--------------------------------------------------------------------------
    // Public
    //--------------------------------------------------------------------------

    return {

        TemplateElement: function(node) {
            ignoredLocs.push(node.loc);
        },

        "Program:exit": function(node) {

            /*
             * At least one space followed by a tab
             * or the reverse before non-tab/-space
             * characters begin.
             */
            var regex = /^(?=[\t ]*(\t | \t))/,
                match,
                lines = sourceCode.lines,
                comments = sourceCode.getAllComments();

            comments.forEach(function(comment) {
                ignoredLocs.push(comment.loc);
            });

            ignoredLocs.sort(function(first, second) {
                if (beforeLoc(first, second.start.line, second.start.column)) {
                    return 1;
                }

                if (beforeLoc(second, first.start.line, second.start.column)) {
                    return -1;
                }

                return 0;
            });

            if (smartTabs) {

                /*
                 * At least one space followed by a tab
                 * before non-tab/-space characters begin.
                 */
                regex = /^(?=[\t ]* \t)/;
            }

            lines.forEach(function(line, i) {
                match = regex.exec(line);

                if (match) {
                    var lineNumber = i + 1,
                        column = match.index + 1;

                    for (var j = 0; j < ignoredLocs.length; j++) {
                        if (beforeLoc(ignoredLocs[j], lineNumber, column)) {
                            continue;
                        }
                        if (afterLoc(ignoredLocs[j], lineNumber, column)) {
                            continue;
                        }

                        return;
                    }

                    context.report(node, { line: lineNumber, column: column }, "Mixed spaces and tabs.");
                }
            });
        }

    };

}

};

},{}],249:[function(require,module,exports){ /**

* @fileoverview Disallow use of multiple spaces.
* @author Nicholas C. Zakas
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow multiple spaces",
        category: "Best Practices",
        recommended: false
    },

    fixable: "whitespace",

    schema: [
        {
            type: "object",
            properties: {
                exceptions: {
                    type: "object",
                    patternProperties: {
                        "^([A-Z][a-z]*)+$": {
                            type: "boolean"
                        }
                    },
                    additionalProperties: false
                }
            },
            additionalProperties: false
        }
    ]
},

create: function(context) {

    // the index of the last comment that was checked
    var exceptions = { Property: true },
        hasExceptions = true,
        options = context.options[0],
        lastCommentIndex = 0;

    if (options && options.exceptions) {
        Object.keys(options.exceptions).forEach(function(key) {
            if (options.exceptions[key]) {
                exceptions[key] = true;
            } else {
                delete exceptions[key];
            }
        });
        hasExceptions = Object.keys(exceptions).length > 0;
    }

    /**
     * Determines if a given source index is in a comment or not by checking
     * the index against the comment range. Since the check goes straight
     * through the file, once an index is passed a certain comment, we can
     * go to the next comment to check that.
     * @param {int} index The source index to check.
     * @param {ASTNode[]} comments An array of comment nodes.
     * @returns {boolean} True if the index is within a comment, false if not.
     * @private
     */
    function isIndexInComment(index, comments) {

        var comment;

        while (lastCommentIndex < comments.length) {

            comment = comments[lastCommentIndex];

            if (comment.range[0] <= index && index < comment.range[1]) {
                return true;
            } else if (index > comment.range[1]) {
                lastCommentIndex++;
            } else {
                break;
            }

        }

        return false;
    }

    //--------------------------------------------------------------------------
    // Public
    //--------------------------------------------------------------------------

    return {
        Program: function() {

            var sourceCode = context.getSourceCode(),
                source = sourceCode.getText(),
                allComments = sourceCode.getAllComments(),
                pattern = /[^\n\r\u2028\u2029\t ].? {2,}/g,  // note: repeating space
                token,
                previousToken,
                parent;

            /**
             * Creates a fix function that removes the multiple spaces between the two tokens
             * @param {RuleFixer} leftToken left token
             * @param {RuleFixer} rightToken right token
             * @returns {function} fix function
             * @private
             */
            function createFix(leftToken, rightToken) {
                return function(fixer) {
                    return fixer.replaceTextRange([leftToken.range[1], rightToken.range[0]], " ");
                };
            }

            while (pattern.test(source)) {

                // do not flag anything inside of comments
                if (!isIndexInComment(pattern.lastIndex, allComments)) {

                    token = sourceCode.getTokenByRangeStart(pattern.lastIndex);
                    if (token) {
                        previousToken = sourceCode.getTokenBefore(token);

                        if (hasExceptions) {
                            parent = sourceCode.getNodeByRangeIndex(pattern.lastIndex - 1);
                        }

                        if (!parent || !exceptions[parent.type]) {
                            context.report({
                                node: token,
                                loc: token.loc.start,
                                message: "Multiple spaces found before '{{value}}'.",
                                data: { value: token.value },
                                fix: createFix(previousToken, token)
                            });
                        }
                    }

                }
            }
        }
    };

}

};

},{}],250:[function(require,module,exports){ /**

* @fileoverview Rule to flag when using multiline strings
* @author Ilya Volodin
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow multiline strings",
        category: "Best Practices",
        recommended: false
    },

    schema: []
},

create: function(context) {

    /**
     * Determines if a given node is part of JSX syntax.
     * @param {ASTNode} node The node to check.
     * @returns {boolean} True if the node is a JSX node, false if not.
     * @private
     */
    function isJSXElement(node) {
        return node.type.indexOf("JSX") === 0;
    }

    //--------------------------------------------------------------------------
    // Public API
    //--------------------------------------------------------------------------

    return {

        Literal: function(node) {
            var lineBreak = /\n/;

            if (lineBreak.test(node.raw) && !isJSXElement(node.parent)) {
                context.report(node, "Multiline support is limited to browsers supporting ES5 only.");
            }
        }
    };

}

};

},{}],251:[function(require,module,exports){ /**

* @fileoverview Disallows multiple blank lines.
* implementation adapted from the no-trailing-spaces rule.
* @author Greg Cochard
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow multiple empty lines",
        category: "Stylistic Issues",
        recommended: false
    },

    fixable: "whitespace",

    schema: [
        {
            type: "object",
            properties: {
                max: {
                    type: "integer",
                    minimum: 0
                },
                maxEOF: {
                    type: "integer",
                    minimum: 0
                },
                maxBOF: {
                    type: "integer",
                    minimum: 0
                }
            },
            required: ["max"],
            additionalProperties: false
        }
    ]
},

create: function(context) {

    // Use options.max or 2 as default
    var max = 2,
        maxEOF,
        maxBOF;

    // store lines that appear empty but really aren't
    var notEmpty = [];

    if (context.options.length) {
        max = context.options[0].max;
        maxEOF = typeof context.options[0].maxEOF !== "undefined" ? context.options[0].maxEOF : max;
        maxBOF = typeof context.options[0].maxBOF !== "undefined" ? context.options[0].maxBOF : max;
    }

    var sourceCode = context.getSourceCode();

    //--------------------------------------------------------------------------
    // Public
    //--------------------------------------------------------------------------

    return {

        TemplateLiteral: function(node) {
            var start = node.loc.start.line;
            var end = node.loc.end.line;

            while (start <= end) {
                notEmpty.push(start);
                start++;
            }
        },

        "Program:exit": function checkBlankLines(node) {
            var lines = sourceCode.lines,
                fullLines = sourceCode.text.match(/.*(\r\n|\r|\n|\u2028|\u2029)/g),
                firstNonBlankLine = -1,
                trimmedLines = [],
                linesRangeStart = [],
                blankCounter = 0,
                currentLocation,
                lastLocation,
                location,
                firstOfEndingBlankLines,
                diff,
                fix,
                rangeStart,
                rangeEnd;

            fix = function(fixer) {
                return fixer.removeRange([rangeStart, rangeEnd]);
            };

            linesRangeStart.push(0);
            lines.forEach(function(str, i) {
                var length = i < fullLines.length ? fullLines[i].length : 0,
                    trimmed = str.trim();

                if ((firstNonBlankLine === -1) && (trimmed !== "")) {
                    firstNonBlankLine = i;
                }

                linesRangeStart.push(linesRangeStart[linesRangeStart.length - 1] + length);
                trimmedLines.push(trimmed);
            });

            // add the notEmpty lines in there with a placeholder
            notEmpty.forEach(function(x, i) {
                trimmedLines[i] = x;
            });

            if (typeof maxEOF === "undefined") {

                /*
                 * Swallow the final newline, as some editors add it
                 * automatically and we don't want it to cause an issue
                 */
                if (trimmedLines[trimmedLines.length - 1] === "") {
                    trimmedLines = trimmedLines.slice(0, -1);
                }

                firstOfEndingBlankLines = trimmedLines.length;
            } else {

                // save the number of the first of the last blank lines
                firstOfEndingBlankLines = trimmedLines.length;
                while (trimmedLines[firstOfEndingBlankLines - 1] === ""
                        && firstOfEndingBlankLines > 0) {
                    firstOfEndingBlankLines--;
                }
            }

            // Aggregate and count blank lines
            if (firstNonBlankLine > maxBOF) {
                diff = firstNonBlankLine - maxBOF;
                rangeStart = linesRangeStart[firstNonBlankLine - diff];
                rangeEnd = linesRangeStart[firstNonBlankLine];
                context.report({
                    node: node,
                    loc: node.loc.start,
                    message: "Too many blank lines at the beginning of file. Max of " + maxBOF + " allowed.",
                    fix: fix
                });
            }
            currentLocation = firstNonBlankLine - 1;

            lastLocation = currentLocation;
            currentLocation = trimmedLines.indexOf("", currentLocation + 1);
            while (currentLocation !== -1) {
                lastLocation = currentLocation;
                currentLocation = trimmedLines.indexOf("", currentLocation + 1);
                if (lastLocation === currentLocation - 1) {
                    blankCounter++;
                } else {
                    location = {
                        line: lastLocation + 1,
                        column: 1
                    };

                    if (lastLocation < firstOfEndingBlankLines) {

                        // within the file, not at the end
                        if (blankCounter >= max) {
                            diff = blankCounter - max + 1;
                            rangeStart = linesRangeStart[location.line - diff];
                            rangeEnd = linesRangeStart[location.line];

                            context.report({
                                node: node,
                                loc: location,
                                message: "More than " + max + " blank " + (max === 1 ? "line" : "lines") + " not allowed.",
                                fix: fix
                            });
                        }
                    } else {

                        // inside the last blank lines
                        if (blankCounter > maxEOF) {
                            diff = blankCounter - maxEOF + 1;
                            rangeStart = linesRangeStart[location.line - diff];
                            rangeEnd = linesRangeStart[location.line - 1];
                            context.report({
                                node: node,
                                loc: location,
                                message: "Too many blank lines at the end of file. Max of " + maxEOF + " allowed.",
                                fix: fix
                            });
                        }
                    }

                    // Finally, reset the blank counter
                    blankCounter = 0;
                }
            }
        }
    };

}

};

},{}],252:[function(require,module,exports){ /**

* @fileoverview Rule to flag when re-assigning native objects
* @author Ilya Volodin
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow reassigning native objects",
        category: "Best Practices",
        recommended: false
    },

    schema: [
        {
            type: "object",
            properties: {
                exceptions: {
                    type: "array",
                    items: {type: "string"},
                    uniqueItems: true
                }
            },
            additionalProperties: false
        }
    ]
},

create: function(context) {
    var config = context.options[0];
    var exceptions = (config && config.exceptions) || [];

    /**
     * Reports write references.
     * @param {Reference} reference - A reference to check.
     * @param {int} index - The index of the reference in the references.
     * @param {Reference[]} references - The array that the reference belongs to.
     * @returns {void}
     */
    function checkReference(reference, index, references) {
        var identifier = reference.identifier;

        if (reference.init === false &&
            reference.isWrite() &&

            // Destructuring assignments can have multiple default value,
            // so possibly there are multiple writeable references for the same identifier.
            (index === 0 || references[index - 1].identifier !== identifier)
        ) {
            context.report({
                node: identifier,
                message: "{{name}} is a read-only native object.",
                data: identifier
            });
        }
    }

    /**
     * Reports write references if a given variable is readonly builtin.
     * @param {Variable} variable - A variable to check.
     * @returns {void}
     */
    function checkVariable(variable) {
        if (variable.writeable === false && exceptions.indexOf(variable.name) === -1) {
            variable.references.forEach(checkReference);
        }
    }

    return {
        Program: function() {
            var globalScope = context.getScope();

            globalScope.variables.forEach(checkVariable);
        }
    };
}

};

},{}],253:[function(require,module,exports){ /**

* @fileoverview Rule to disallow a negated condition
* @author Alberto Rodríguez
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow negated conditions",
        category: "Stylistic Issues",
        recommended: false
    },

    schema: []
},

create: function(context) {

    /**
     * Determines if a given node is an if-else without a condition on the else
     * @param {ASTNode} node The node to check.
     * @returns {boolean} True if the node has an else without an if.
     * @private
     */
    function hasElseWithoutCondition(node) {
        return node.alternate && node.alternate.type !== "IfStatement";
    }

    /**
     * Determines if a given node is a negated unary expression
     * @param {Object} test The test object to check.
     * @returns {boolean} True if the node is a negated unary expression.
     * @private
     */
    function isNegatedUnaryExpression(test) {
        return test.type === "UnaryExpression" && test.operator === "!";
    }

    /**
     * Determines if a given node is a negated binary expression
     * @param {Test} test The test to check.
     * @returns {boolean} True if the node is a negated binary expression.
     * @private
     */
    function isNegatedBinaryExpression(test) {
        return test.type === "BinaryExpression" &&
            (test.operator === "!=" || test.operator === "!==");
    }

    /**
     * Determines if a given node has a negated if expression
     * @param {ASTNode} node The node to check.
     * @returns {boolean} True if the node has a negated if expression.
     * @private
     */
    function isNegatedIf(node) {
        return isNegatedUnaryExpression(node.test) || isNegatedBinaryExpression(node.test);
    }

    return {
        IfStatement: function(node) {
            if (!hasElseWithoutCondition(node)) {
                return;
            }

            if (isNegatedIf(node)) {
                context.report(node, "Unexpected negated condition.");
            }
        },
        ConditionalExpression: function(node) {
            if (isNegatedIf(node)) {
                context.report(node, "Unexpected negated condition.");
            }
        }
    };
}

};

},{}],254:[function(require,module,exports){ /**

* @fileoverview A rule to disallow negated left operands of the `in` operator
* @author Michael Ficarra
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow negating the left operand in `in` expressions",
        category: "Possible Errors",
        recommended: true
    },

    schema: []
},

create: function(context) {

    return {

        BinaryExpression: function(node) {
            if (node.operator === "in" && node.left.type === "UnaryExpression" && node.left.operator === "!") {
                context.report(node, "The 'in' expression's left operand is negated");
            }
        }
    };

}

};

},{}],255:[function(require,module,exports){ /**

* @fileoverview Rule to flag nested ternary expressions
* @author Ian Christian Myers
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow nested ternary expressions",
        category: "Stylistic Issues",
        recommended: false
    },

    schema: []
},

create: function(context) {

    return {
        ConditionalExpression: function(node) {
            if (node.alternate.type === "ConditionalExpression" ||
                    node.consequent.type === "ConditionalExpression") {
                context.report(node, "Do not nest ternary expressions");
            }
        }
    };
}

};

},{}],256:[function(require,module,exports){ /**

* @fileoverview Rule to flag when using new Function
* @author Ilya Volodin
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow `new` operators with the `Function` object",
        category: "Best Practices",
        recommended: false
    },

    schema: []
},

create: function(context) {

    //--------------------------------------------------------------------------
    // Helpers
    //--------------------------------------------------------------------------

    /**
     * Checks if the callee is the Function constructor, and if so, reports an issue.
     * @param {ASTNode} node The node to check and report on
     * @returns {void}
     * @private
     */
    function validateCallee(node) {
        if (node.callee.name === "Function") {
            context.report(node, "The Function constructor is eval.");
        }
    }

    return {
        NewExpression: validateCallee,
        CallExpression: validateCallee
    };

}

};

},{}],257:[function(require,module,exports){ /**

* @fileoverview A rule to disallow calls to the Object constructor
* @author Matt DuVall <http://www.mattduvall.com/>
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow `Object` constructors",
        category: "Stylistic Issues",
        recommended: false
    },

    schema: []
},

create: function(context) {

    return {

        NewExpression: function(node) {
            if (node.callee.name === "Object") {
                context.report(node, "The object literal notation {} is preferrable.");
            }
        }
    };

}

};

},{}],258:[function(require,module,exports){ /**

* @fileoverview Rule to disallow use of new operator with the `require` function
* @author Wil Moore III
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow `new` operators with calls to `require`",
        category: "Node.js and CommonJS",
        recommended: false
    },

    schema: []
},

create: function(context) {

    return {

        NewExpression: function(node) {
            if (node.callee.type === "Identifier" && node.callee.name === "require") {
                context.report(node, "Unexpected use of new with require.");
            }
        }
    };

}

};

},{}],259:[function(require,module,exports){ /**

* @fileoverview Rule to disallow use of the new operator with the `Symbol` object
* @author Alberto Rodríguez
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow `new` operators with the `Symbol` object",
        category: "ECMAScript 6",
        recommended: true
    },

    schema: []
},

create: function(context) {

    return {
        "Program:exit": function() {
            var globalScope = context.getScope();
            var variable = globalScope.set.get("Symbol");

            if (variable && variable.defs.length === 0) {
                variable.references.forEach(function(ref) {
                    var node = ref.identifier;

                    if (node.parent && node.parent.type === "NewExpression") {
                        context.report(node, "`Symbol` cannot be called as a constructor.");
                    }
                });
            }
        }
    };

}

};

},{}],260:[function(require,module,exports){ /**

* @fileoverview Rule to flag when using constructor for wrapper objects
* @author Ilya Volodin
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow `new` operators with the `String`, `Number`, and `Boolean` objects",
        category: "Best Practices",
        recommended: false
    },

    schema: []
},

create: function(context) {

    return {

        NewExpression: function(node) {
            var wrapperObjects = ["String", "Number", "Boolean", "Math", "JSON"];

            if (wrapperObjects.indexOf(node.callee.name) > -1) {
                context.report(node, "Do not use {{fn}} as a constructor.", { fn: node.callee.name });
            }
        }
    };

}

};

},{}],261:[function(require,module,exports){ /**

* @fileoverview Rule to flag statements with function invocation preceded by
* "new" and not part of assignment
* @author Ilya Volodin
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow `new` operators outside of assignments or comparisons",
        category: "Best Practices",
        recommended: false
    },

    schema: []
},

create: function(context) {

    return {

        ExpressionStatement: function(node) {

            if (node.expression.type === "NewExpression") {
                context.report(node, "Do not use 'new' for side effects.");
            }
        }
    };

}

};

},{}],262:[function(require,module,exports){ /**

* @fileoverview Rule to flag use of an object property of the global object (Math and JSON) as a function
* @author James Allardice
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow calling global object properties as functions",
        category: "Possible Errors",
        recommended: true
    },

    schema: []
},

create: function(context) {

    return {
        CallExpression: function(node) {

            if (node.callee.type === "Identifier") {
                var name = node.callee.name;

                if (name === "Math" || name === "JSON") {
                    context.report(node, "'{{name}}' is not a function.", { name: name });
                }
            }
        }
    };

}

};

},{}],263:[function(require,module,exports){ /**

* @fileoverview Rule to flag octal escape sequences in string literals.
* @author Ian Christian Myers
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow octal escape sequences in string literals",
        category: "Best Practices",
        recommended: false
    },

    schema: []
},

create: function(context) {

    return {

        Literal: function(node) {
            if (typeof node.value !== "string") {
                return;
            }

            var match = node.raw.match(/^([^\\]|\\[^0-7])*\\([0-3][0-7]{1,2}|[4-7][0-7]|[0-7])/),
                octalDigit;

            if (match) {
                octalDigit = match[2];

                // \0 is actually not considered an octal
                if (match[2] !== "0" || typeof match[3] !== "undefined") {
                    context.report(node, "Don't use octal: '\\{{octalDigit}}'. Use '\\u....' instead.",
                            { octalDigit: octalDigit });
                }
            }
        }

    };

}

};

},{}],264:[function(require,module,exports){ /**

* @fileoverview Rule to flag when initializing octal literal
* @author Ilya Volodin
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow octal literals",
        category: "Best Practices",
        recommended: true
    },

    schema: []
},

create: function(context) {

    return {

        Literal: function(node) {
            if (typeof node.value === "number" && /^0[0-7]/.test(node.raw)) {
                context.report(node, "Octal literals should not be used.");
            }
        }
    };

}

};

},{}],265:[function(require,module,exports){ /**

* @fileoverview Disallow reassignment of function parameters.
* @author Nat Burns
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

var stopNodePattern = /(?:Statement|Declaration|Function(?:Expression)?|Program)$/;

module.exports = {

meta: {
    docs: {
        description: "disallow reassigning `function` parameters",
        category: "Best Practices",
        recommended: false
    },

    schema: [
        {
            type: "object",
            properties: {
                props: {type: "boolean"}
            },
            additionalProperties: false
        }
    ]
},

create: function(context) {
    var props = context.options[0] && Boolean(context.options[0].props);

    /**
     * Checks whether or not the reference modifies properties of its variable.
     * @param {Reference} reference - A reference to check.
     * @returns {boolean} Whether or not the reference modifies properties of its variable.
     */
    function isModifyingProp(reference) {
        var node = reference.identifier;
        var parent = node.parent;

        while (parent && !stopNodePattern.test(parent.type)) {
            switch (parent.type) {

                // e.g. foo.a = 0;
                case "AssignmentExpression":
                    return parent.left === node;

                // e.g. ++foo.a;
                case "UpdateExpression":
                    return true;

                // e.g. delete foo.a;
                case "UnaryExpression":
                    if (parent.operator === "delete") {
                        return true;
                    }
                    break;

                // EXCLUDES: e.g. cache.get(foo.a).b = 0;
                case "CallExpression":
                    if (parent.callee !== node) {
                        return false;
                    }
                    break;

                // EXCLUDES: e.g. cache[foo.a] = 0;
                case "MemberExpression":
                    if (parent.property === node) {
                        return false;
                    }
                    break;

                default:
                    break;
            }

            node = parent;
            parent = node.parent;
        }

        return false;
    }

    /**
     * Reports a reference if is non initializer and writable.
     * @param {Reference} reference - A reference to check.
     * @param {int} index - The index of the reference in the references.
     * @param {Reference[]} references - The array that the reference belongs to.
     * @returns {void}
     */
    function checkReference(reference, index, references) {
        var identifier = reference.identifier;

        if (identifier &&
            !reference.init &&

            // Destructuring assignments can have multiple default value,
            // so possibly there are multiple writeable references for the same identifier.
            (index === 0 || references[index - 1].identifier !== identifier)
        ) {
            if (reference.isWrite()) {
                context.report(
                    identifier,
                    "Assignment to function parameter '{{name}}'.",
                    {name: identifier.name});
            } else if (props && isModifyingProp(reference)) {
                context.report(
                    identifier,
                    "Assignment to property of function parameter '{{name}}'.",
                    {name: identifier.name});
            }
        }
    }

    /**
     * Finds and reports references that are non initializer and writable.
     * @param {Variable} variable - A variable to check.
     * @returns {void}
     */
    function checkVariable(variable) {
        if (variable.defs[0].type === "Parameter") {
            variable.references.forEach(checkReference);
        }
    }

    /**
     * Checks parameters of a given function node.
     * @param {ASTNode} node - A function node to check.
     * @returns {void}
     */
    function checkForFunction(node) {
        context.getDeclaredVariables(node).forEach(checkVariable);
    }

    return {

        // `:exit` is needed for the `node.parent` property of identifier nodes.
        "FunctionDeclaration:exit": checkForFunction,
        "FunctionExpression:exit": checkForFunction,
        "ArrowFunctionExpression:exit": checkForFunction
    };

}

};

},{}],266:[function(require,module,exports){ /**

* @fileoverview Disallow string concatenation when using __dirname and __filename
* @author Nicholas C. Zakas
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow string concatenation with `__dirname` and `__filename`",
        category: "Node.js and CommonJS",
        recommended: false
    },

    schema: []
},

create: function(context) {

    var MATCHER = /^__(?:dir|file)name$/;

    //--------------------------------------------------------------------------
    // Public
    //--------------------------------------------------------------------------

    return {

        BinaryExpression: function(node) {

            var left = node.left,
                right = node.right;

            if (node.operator === "+" &&
                    ((left.type === "Identifier" && MATCHER.test(left.name)) ||
                    (right.type === "Identifier" && MATCHER.test(right.name)))
            ) {

                context.report(node, "Use path.join() or path.resolve() instead of + to create paths.");
            }
        }

    };

}

};

},{}],267:[function(require,module,exports){ /**

* @fileoverview Rule to flag use of unary increment and decrement operators.
* @author Ian Christian Myers
* @author Brody McKee (github.com/mrmckeb)
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow the unary operators `++` and `--`",
        category: "Stylistic Issues",
        recommended: false
    },

    schema: [
        {
            type: "object",
            properties: {
                allowForLoopAfterthoughts: {
                    type: "boolean"
                }
            },
            additionalProperties: false
        }
    ]
},

create: function(context) {

    var config = context.options[0],
        allowInForAfterthought = false;

    if (typeof config === "object") {
        allowInForAfterthought = config.allowForLoopAfterthoughts === true;
    }

    return {

        UpdateExpression: function(node) {
            if (allowInForAfterthought && node.parent.type === "ForStatement") {
                return;
            }
            context.report(node, "Unary operator '" + node.operator + "' used.");
        }

    };

}

};

},{}],268:[function(require,module,exports){ /**

* @fileoverview Disallow the use of process.env()
* @author Vignesh Anand
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow the use of `process.env`",
        category: "Node.js and CommonJS",
        recommended: false
    },

    schema: []
},

create: function(context) {

    return {

        MemberExpression: function(node) {
            var objectName = node.object.name,
                propertyName = node.property.name;

            if (objectName === "process" && !node.computed && propertyName && propertyName === "env") {
                context.report(node, "Unexpected use of process.env.");
            }

        }

    };

}

};

},{}],269:[function(require,module,exports){ /**

* @fileoverview Disallow the use of process.exit()
* @author Nicholas C. Zakas
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow the use of `process.exit()`",
        category: "Node.js and CommonJS",
        recommended: false
    },

    schema: []
},

create: function(context) {

    //--------------------------------------------------------------------------
    // Public
    //--------------------------------------------------------------------------

    return {

        CallExpression: function(node) {
            var callee = node.callee;

            if (callee.type === "MemberExpression" && callee.object.name === "process" &&
                callee.property.name === "exit"
            ) {
                context.report(node, "Don't use process.exit(); throw an error instead.");
            }
        }

    };

}

};

},{}],270:[function(require,module,exports){ /**

* @fileoverview Rule to flag usage of __proto__ property
* @author Ilya Volodin
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow the use of the `__proto__` property",
        category: "Best Practices",
        recommended: false
    },

    schema: []
},

create: function(context) {

    return {

        MemberExpression: function(node) {

            if (node.property &&
                    (node.property.type === "Identifier" && node.property.name === "__proto__" && !node.computed) ||
                    (node.property.type === "Literal" && node.property.value === "__proto__")) {
                context.report(node, "The '__proto__' property is deprecated.");
            }
        }
    };

}

};

},{}],271:[function(require,module,exports){ /**

* @fileoverview Rule to disallow use of Object.prototype builtins on objects
* @author Andrew Levine
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow calling some Object.prototype methods directly on objects",
        category: "Possible Errors",
        recommended: false
    }
},

create: function(context) {
    var DISALLOWED_PROPS = [
        "hasOwnProperty",
        "isPrototypeOf",
        "propertyIsEnumerable"
    ];

    /**
     * Reports if a disallowed property is used in a CallExpression
     * @param {ASTNode} node The CallExpression node.
     * @returns {void}
     */
    function disallowBuiltIns(node) {
        if (node.callee.type !== "MemberExpression" || node.callee.computed) {
            return;
        }
        var propName = node.callee.property.name;

        if (DISALLOWED_PROPS.indexOf(propName) > -1) {
            context.report({
                message: "Do not access Object.prototype method '{{prop}}' from target object.",
                loc: node.callee.property.loc.start,
                data: {prop: propName},
                node: node
            });
        }
    }

    return {
        CallExpression: disallowBuiltIns
    };
}

};

},{}],272:[function(require,module,exports){ /**

* @fileoverview Rule to flag when the same variable is declared more then once.
* @author Ilya Volodin
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow `var` redeclaration",
        category: "Best Practices",
        recommended: true
    },

    schema: [
        {
            type: "object",
            properties: {
                builtinGlobals: {type: "boolean"}
            },
            additionalProperties: false
        }
    ]
},

create: function(context) {
    var options = {
        builtinGlobals: Boolean(context.options[0] && context.options[0].builtinGlobals)
    };

    /**
     * Find variables in a given scope and flag redeclared ones.
     * @param {Scope} scope - An escope scope object.
     * @returns {void}
     * @private
     */
    function findVariablesInScope(scope) {
        scope.variables.forEach(function(variable) {
            var hasBuiltin = options.builtinGlobals && "writeable" in variable;
            var count = (hasBuiltin ? 1 : 0) + variable.identifiers.length;

            if (count >= 2) {
                variable.identifiers.sort(function(a, b) {
                    return a.range[1] - b.range[1];
                });

                for (var i = (hasBuiltin ? 0 : 1), l = variable.identifiers.length; i < l; i++) {
                    context.report(
                        variable.identifiers[i],
                        "'{{a}}' is already defined",
                        {a: variable.name});
                }
            }
        });

    }

    /**
     * Find variables in the current scope.
     * @param {ASTNode} node - The Program node.
     * @returns {void}
     * @private
     */
    function checkForGlobal(node) {
        var scope = context.getScope(),
            parserOptions = context.parserOptions,
            ecmaFeatures = parserOptions.ecmaFeatures || {};

        // Nodejs env or modules has a special scope.
        if (ecmaFeatures.globalReturn || node.sourceType === "module") {
            findVariablesInScope(scope.childScopes[0]);
        } else {
            findVariablesInScope(scope);
        }
    }

    /**
     * Find variables in the current scope.
     * @returns {void}
     * @private
     */
    function checkForBlock() {
        findVariablesInScope(context.getScope());
    }

    if (context.parserOptions.ecmaVersion >= 6) {
        return {
            Program: checkForGlobal,
            BlockStatement: checkForBlock,
            SwitchStatement: checkForBlock
        };
    } else {
        return {
            Program: checkForGlobal,
            FunctionDeclaration: checkForBlock,
            FunctionExpression: checkForBlock,
            ArrowFunctionExpression: checkForBlock
        };
    }
}

};

},{}],273:[function(require,module,exports){ /**

* @fileoverview Rule to count multiple spaces in regular expressions
* @author Matt DuVall <http://www.mattduvall.com/>
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow multiple spaces in regular expression literals",
        category: "Possible Errors",
        recommended: true
    },

    schema: []
},

create: function(context) {
    var sourceCode = context.getSourceCode();

    return {

        Literal: function(node) {
            var token = sourceCode.getFirstToken(node),
                nodeType = token.type,
                nodeValue = token.value,
                multipleSpacesRegex = /( {2,})+?/,
                regexResults;

            if (nodeType === "RegularExpression") {
                regexResults = multipleSpacesRegex.exec(nodeValue);

                if (regexResults !== null) {
                    context.report(node, "Spaces are hard to count. Use {" + regexResults[0].length + "}.");
                }
            }
        }
    };

}

};

},{}],274:[function(require,module,exports){ /**

* @fileoverview Restrict usage of specified globals.
* @author Benoît Zugmeyer
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow specified global variables",
        category: "Variables",
        recommended: false
    },

    schema: {
        type: "array",
        items: {
            type: "string"
        },
        uniqueItems: true
    }
},

create: function(context) {
    var restrictedGlobals = context.options;

    // if no globals are restricted we don't need to check
    if (restrictedGlobals.length === 0) {
        return {};
    }

    /**
     * Report a variable to be used as a restricted global.
     * @param {Reference} reference the variable reference
     * @returns {void}
     * @private
     */
    function reportReference(reference) {
        context.report(reference.identifier, "Unexpected use of '{{name}}'", {
            name: reference.identifier.name
        });
    }

    /**
     * Check if the given name is a restricted global name.
     * @param {string} name name of a variable
     * @returns {boolean} whether the variable is a restricted global or not
     * @private
     */
    function isRestricted(name) {
        return restrictedGlobals.indexOf(name) >= 0;
    }

    return {
        Program: function() {
            var scope = context.getScope();

            // Report variables declared elsewhere (ex: variables defined as "global" by eslint)
            scope.variables.forEach(function(variable) {
                if (!variable.defs.length && isRestricted(variable.name)) {
                    variable.references.forEach(reportReference);
                }
            });

            // Report variables not declared at all
            scope.through.forEach(function(reference) {
                if (isRestricted(reference.identifier.name)) {
                    reportReference(reference);
                }
            });

        }
    };
}

};

},{}],275:[function(require,module,exports){ /**

* @fileoverview Restrict usage of specified node imports.
* @author Guy Ellis
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow specified modules when loaded by `import`",
        category: "ECMAScript 6",
        recommended: false
    },

    schema: {
        type: "array",
        items: {
            type: "string"
        },
        uniqueItems: true
    }
},

create: function(context) {
    var restrictedImports = context.options;

    // if no imports are restricted we don"t need to check
    if (restrictedImports.length === 0) {
        return {};
    }

    return {
        ImportDeclaration: function(node) {
            if (node && node.source && node.source.value) {

                var value = node.source.value.trim();

                if (restrictedImports.indexOf(value) !== -1) {
                    context.report(node, "'{{importName}}' import is restricted from being used.", {
                        importName: value
                    });
                }
            }
        }
    };
}

};

},{}],276:[function(require,module,exports){ /**

* @fileoverview Restrict usage of specified node modules.
* @author Christian Schulz
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow specified modules when loaded by `require`",
        category: "Node.js and CommonJS",
        recommended: false
    },

    schema: {
        type: "array",
        items: {
            type: "string"
        },
        uniqueItems: true
    }
},

create: function(context) {

    // trim restricted module names
    var restrictedModules = context.options;

    // if no modules are restricted we don't need to check the CallExpressions
    if (restrictedModules.length === 0) {
        return {};
    }

    /**
     * Function to check if a node is a string literal.
     * @param {ASTNode} node The node to check.
     * @returns {boolean} If the node is a string literal.
     */
    function isString(node) {
        return node && node.type === "Literal" && typeof node.value === "string";
    }

    /**
     * Function to check if a node is a require call.
     * @param {ASTNode} node The node to check.
     * @returns {boolean} If the node is a require call.
     */
    function isRequireCall(node) {
        return node.callee.type === "Identifier" && node.callee.name === "require";
    }

    /**
     * Function to check if a node has an argument that is an restricted module and return its name.
     * @param {ASTNode} node The node to check
     * @returns {undefined|String} restricted module name or undefined if node argument isn't restricted.
     */
    function getRestrictedModuleName(node) {
        var moduleName;

        // node has arguments and first argument is string
        if (node.arguments.length && isString(node.arguments[0])) {
            var argumentValue = node.arguments[0].value.trim();

            // check if argument value is in restricted modules array
            if (restrictedModules.indexOf(argumentValue) !== -1) {
                moduleName = argumentValue;
            }
        }

        return moduleName;
    }

    return {
        CallExpression: function(node) {
            if (isRequireCall(node)) {
                var restrictedModuleName = getRestrictedModuleName(node);

                if (restrictedModuleName) {
                    context.report(node, "'{{moduleName}}' module is restricted from being used.", {
                        moduleName: restrictedModuleName
                    });
                }
            }
        }
    };
}

};

},{}],277:[function(require,module,exports){ /**

* @fileoverview Rule to flag use of certain node types
* @author Burak Yigit Kaya
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

var nodeTypes = require(“espree”).Syntax;

module.exports = {

meta: {
    docs: {
        description: "disallow specified syntax",
        category: "Stylistic Issues",
        recommended: false
    },

    schema: {
        type: "array",
        items: [
            {
                enum: Object.keys(nodeTypes).map(function(k) {
                    return nodeTypes[k];
                })
            }
        ],
        uniqueItems: true,
        minItems: 0
    }
},

create: function(context) {

    /**
     * Generates a warning from the provided node, saying that node type is not allowed.
     * @param {ASTNode} node The node to warn on
     * @returns {void}
     */
    function warn(node) {
        context.report(node, "Using '{{type}}' is not allowed.", node);
    }

    return context.options.reduce(function(result, nodeType) {
        result[nodeType] = warn;

        return result;
    }, {});

}

};

},{“espree”:“espree”}],278:[function(require,module,exports){ /**

* @fileoverview Rule to flag when return statement contains assignment
* @author Ilya Volodin
*/

“use strict”;

//—————————————————————————— // Helpers //——————————————————————————

var SENTINEL_TYPE = /^(?:[a-zA-Z]+?Statement|ArrowFunctionExpression|FunctionExpression|ClassExpression)$/;

/**

* Checks whether or not a node is enclosed in parentheses.
* @param {Node|null} node - A node to check.
* @param {sourceCode} sourceCode - The ESLint SourceCode object.
* @returns {boolean} Whether or not the node is enclosed in parentheses.
*/

function isEnclosedInParens(node, sourceCode) {

var prevToken = sourceCode.getTokenBefore(node);
var nextToken = sourceCode.getTokenAfter(node);

return prevToken && prevToken.value === "(" && nextToken && nextToken.value === ")";

}

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow assignment operators in `return` statements",
        category: "Best Practices",
        recommended: false
    },

    schema: [
        {
            enum: ["except-parens", "always"]
        }
    ]
},

create: function(context) {
    var always = (context.options[0] || "except-parens") !== "except-parens";
    var sourceCode = context.getSourceCode();

    return {
        AssignmentExpression: function(node) {
            if (!always && isEnclosedInParens(node, sourceCode)) {
                return;
            }

            var parent = node.parent;

            // Find ReturnStatement or ArrowFunctionExpression in ancestors.
            while (parent && !SENTINEL_TYPE.test(parent.type)) {
                node = parent;
                parent = parent.parent;
            }

            // Reports.
            if (parent && parent.type === "ReturnStatement") {
                context.report({
                    node: parent,
                    message: "Return statement should not contain assignment."
                });
            } else if (parent && parent.type === "ArrowFunctionExpression" && parent.body === node) {
                context.report({
                    node: parent,
                    message: "Arrow function should not return assignment."
                });
            }
        }
    };
}

};

},{}],279:[function(require,module,exports){ /**

* @fileoverview Rule to flag when using javascript: urls
* @author Ilya Volodin
*/

/* jshint scripturl: true */ /* eslint no-script-url: 0 */

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow `javascript",
        category: "Best Practices",
        recommended: false
    },

    schema: []
},

create: function(context) {

    return {

        Literal: function(node) {

            var value;

            if (node.value && typeof node.value === "string") {
                value = node.value.toLowerCase();

                if (value.indexOf("javascript:") === 0) {
                    context.report(node, "Script URL is a form of eval.");
                }
            }
        }
    };

}

};

},{}],280:[function(require,module,exports){ /**

* @fileoverview Rule to disallow assignments where both sides are exactly the same
* @author Toru Nagashima
*/

“use strict”;

//—————————————————————————— // Helpers //——————————————————————————

/**

* Traverses 2 Pattern nodes in parallel, then reports self-assignments.
*
* @param {ASTNode|null} left - A left node to traverse. This is a Pattern or
*      a Property.
* @param {ASTNode|null} right - A right node to traverse. This is a Pattern or
*      a Property.
* @param {function} report - A callback function to report.
* @returns {void}
*/

function eachSelfAssignment(left, right, report) {

var i, j;

if (!left || !right) {

    // do nothing
} else if (
    left.type === "Identifier" &&
    right.type === "Identifier" &&
    left.name === right.name
) {
    report(right);
} else if (
    left.type === "ArrayPattern" &&
    right.type === "ArrayExpression"
) {
    var end = Math.min(left.elements.length, right.elements.length);

    for (i = 0; i < end; ++i) {
        var rightElement = right.elements[i];

        eachSelfAssignment(left.elements[i], rightElement, report);

        // After a spread element, those indices are unknown.
        if (rightElement && rightElement.type === "SpreadElement") {
            break;
        }
    }
} else if (
    left.type === "RestElement" &&
    right.type === "SpreadElement"
) {
    eachSelfAssignment(left.argument, right.argument, report);
} else if (
    left.type === "ObjectPattern" &&
    right.type === "ObjectExpression" &&
    right.properties.length >= 1
) {

    // Gets the index of the last spread property.
    // It's possible to overwrite properties followed by it.
    var startJ = 0;

    for (i = right.properties.length - 1; i >= 0; --i) {
        if (right.properties[i].type === "ExperimentalSpreadProperty") {
            startJ = i + 1;
            break;
        }
    }

    for (i = 0; i < left.properties.length; ++i) {
        for (j = startJ; j < right.properties.length; ++j) {
            eachSelfAssignment(
                left.properties[i],
                right.properties[j],
                report
            );
        }
    }
} else if (
    left.type === "Property" &&
    right.type === "Property" &&
    !left.computed &&
    !right.computed &&
    right.kind === "init" &&
    !right.method &&
    left.key.name === right.key.name
) {
    eachSelfAssignment(left.value, right.value, report);
}

}

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow assignments where both sides are exactly the same",
        category: "Best Practices",
        recommended: true
    },

    schema: []
},

create: function(context) {

    /**
     * Reports a given node as self assignments.
     *
     * @param {ASTNode} node - A node to report. This is an Identifier node.
     * @returns {void}
     */
    function report(node) {
        context.report({
            node: node,
            message: "'{{name}}' is assigned to itself.",
            data: node
        });
    }

    return {
        AssignmentExpression: function(node) {
            if (node.operator === "=") {
                eachSelfAssignment(node.left, node.right, report);
            }
        }
    };
}

};

},{}],281:[function(require,module,exports){ /**

* @fileoverview Rule to flag comparison where left part is the same as the right
* part.
* @author Ilya Volodin
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow comparisons where both sides are exactly the same",
        category: "Best Practices",
        recommended: false
    },

    schema: []
},

create: function(context) {

    return {

        BinaryExpression: function(node) {
            var operators = ["===", "==", "!==", "!=", ">", "<", ">=", "<="];

            if (operators.indexOf(node.operator) > -1 &&
                (node.left.type === "Identifier" && node.right.type === "Identifier" && node.left.name === node.right.name ||
                node.left.type === "Literal" && node.right.type === "Literal" && node.left.value === node.right.value)) {
                context.report(node, "Comparing to itself is potentially pointless.");
            }
        }
    };

}

};

},{}],282:[function(require,module,exports){ /**

* @fileoverview Rule to flag use of comma operator
* @author Brandon Mills
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow comma operators",
        category: "Best Practices",
        recommended: false
    },

    schema: []
},

create: function(context) {
    var sourceCode = context.getSourceCode();

    /**
     * Parts of the grammar that are required to have parens.
     */
    var parenthesized = {
        DoWhileStatement: "test",
        IfStatement: "test",
        SwitchStatement: "discriminant",
        WhileStatement: "test",
        WithStatement: "object",
        ArrowFunctionExpression: "body"

        // Omitting CallExpression - commas are parsed as argument separators
        // Omitting NewExpression - commas are parsed as argument separators
        // Omitting ForInStatement - parts aren't individually parenthesised
        // Omitting ForStatement - parts aren't individually parenthesised
    };

    /**
     * Determines whether a node is required by the grammar to be wrapped in
     * parens, e.g. the test of an if statement.
     * @param {ASTNode} node - The AST node
     * @returns {boolean} True if parens around node belong to parent node.
     */
    function requiresExtraParens(node) {
        return node.parent && parenthesized[node.parent.type] &&
                node === node.parent[parenthesized[node.parent.type]];
    }

    /**
     * Check if a node is wrapped in parens.
     * @param {ASTNode} node - The AST node
     * @returns {boolean} True if the node has a paren on each side.
     */
    function isParenthesised(node) {
        var previousToken = sourceCode.getTokenBefore(node),
            nextToken = sourceCode.getTokenAfter(node);

        return previousToken && nextToken &&
            previousToken.value === "(" && previousToken.range[1] <= node.range[0] &&
            nextToken.value === ")" && nextToken.range[0] >= node.range[1];
    }

    /**
     * Check if a node is wrapped in two levels of parens.
     * @param {ASTNode} node - The AST node
     * @returns {boolean} True if two parens surround the node on each side.
     */
    function isParenthesisedTwice(node) {
        var previousToken = sourceCode.getTokenBefore(node, 1),
            nextToken = sourceCode.getTokenAfter(node, 1);

        return isParenthesised(node) && previousToken && nextToken &&
            previousToken.value === "(" && previousToken.range[1] <= node.range[0] &&
            nextToken.value === ")" && nextToken.range[0] >= node.range[1];
    }

    return {
        SequenceExpression: function(node) {

            // Always allow sequences in for statement update
            if (node.parent.type === "ForStatement" &&
                    (node === node.parent.init || node === node.parent.update)) {
                return;
            }

            // Wrapping a sequence in extra parens indicates intent
            if (requiresExtraParens(node)) {
                if (isParenthesisedTwice(node)) {
                    return;
                }
            } else {
                if (isParenthesised(node)) {
                    return;
                }
            }

            var child = sourceCode.getTokenAfter(node.expressions[0]);

            context.report(node, child.loc.start, "Unexpected use of comma operator.");
        }
    };

}

};

},{}],283:[function(require,module,exports){ /**

* @fileoverview Disallow shadowing of NaN, undefined, and Infinity (ES5 section 15.1.1)
* @author Michael Ficarra
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow identifiers from shadowing restricted names",
        category: "Variables",
        recommended: false
    },

    schema: []
},

create: function(context) {

    var RESTRICTED = ["undefined", "NaN", "Infinity", "arguments", "eval"];

    /**
     * Check if the node name is present inside the restricted list
     * @param {ASTNode} id id to evaluate
     * @returns {void}
     * @private
     */
    function checkForViolation(id) {
        if (RESTRICTED.indexOf(id.name) > -1) {
            context.report(id, "Shadowing of global property '" + id.name + "'.");
        }
    }

    return {
        VariableDeclarator: function(node) {
            checkForViolation(node.id);
        },
        ArrowFunctionExpression: function(node) {
            [].map.call(node.params, checkForViolation);
        },
        FunctionExpression: function(node) {
            if (node.id) {
                checkForViolation(node.id);
            }
            [].map.call(node.params, checkForViolation);
        },
        FunctionDeclaration: function(node) {
            if (node.id) {
                checkForViolation(node.id);
                [].map.call(node.params, checkForViolation);
            }
        },
        CatchClause: function(node) {
            checkForViolation(node.param);
        }
    };

}

};

},{}],284:[function(require,module,exports){ /**

* @fileoverview Rule to flag on declaring variables already declared in the outer scope
* @author Ilya Volodin
*/

“use strict”;

//—————————————————————————— // Requirements //——————————————————————————

var astUtils = require(“../ast-utils”);

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow `var` declarations from shadowing variables in the outer scope",
        category: "Variables",
        recommended: false
    },

    schema: [
        {
            type: "object",
            properties: {
                builtinGlobals: {type: "boolean"},
                hoist: {enum: ["all", "functions", "never"]},
                allow: {
                    type: "array",
                    items: {
                        type: "string"
                    }
                }
            },
            additionalProperties: false
        }
    ]
},

create: function(context) {

    var options = {
        builtinGlobals: Boolean(context.options[0] && context.options[0].builtinGlobals),
        hoist: (context.options[0] && context.options[0].hoist) || "functions",
        allow: (context.options[0] && context.options[0].allow) || []
    };

    /**
     * Check if variable name is allowed.
     *
     * @param  {ASTNode} variable The variable to check.
     * @returns {boolean} Whether or not the variable name is allowed.
     */
    function isAllowed(variable) {
        return options.allow.indexOf(variable.name) !== -1;
    }

    /**
     * Checks if a variable of the class name in the class scope of ClassDeclaration.
     *
     * ClassDeclaration creates two variables of its name into its outer scope and its class scope.
     * So we should ignore the variable in the class scope.
     *
     * @param {Object} variable The variable to check.
     * @returns {boolean} Whether or not the variable of the class name in the class scope of ClassDeclaration.
     */
    function isDuplicatedClassNameVariable(variable) {
        var block = variable.scope.block;

        return block.type === "ClassDeclaration" && block.id === variable.identifiers[0];
    }

    /**
     * Checks if a variable is inside the initializer of scopeVar.
     *
     * To avoid reporting at declarations such as `var a = function a() {};`.
     * But it should report `var a = function(a) {};` or `var a = function() { function a() {} };`.
     *
     * @param {Object} variable The variable to check.
     * @param {Object} scopeVar The scope variable to look for.
     * @returns {boolean} Whether or not the variable is inside initializer of scopeVar.
     */
    function isOnInitializer(variable, scopeVar) {
        var outerScope = scopeVar.scope;
        var outerDef = scopeVar.defs[0];
        var outer = outerDef && outerDef.parent && outerDef.parent.range;
        var innerScope = variable.scope;
        var innerDef = variable.defs[0];
        var inner = innerDef && innerDef.name.range;

        return (
            outer &&
            inner &&
            outer[0] < inner[0] &&
            inner[1] < outer[1] &&
            ((innerDef.type === "FunctionName" && innerDef.node.type === "FunctionExpression") || innerDef.node.type === "ClassExpression") &&
            outerScope === innerScope.upper
        );
    }

    /**
     * Get a range of a variable's identifier node.
     * @param {Object} variable The variable to get.
     * @returns {Array|undefined} The range of the variable's identifier node.
     */
    function getNameRange(variable) {
        var def = variable.defs[0];

        return def && def.name.range;
    }

    /**
     * Checks if a variable is in TDZ of scopeVar.
     * @param {Object} variable The variable to check.
     * @param {Object} scopeVar The variable of TDZ.
     * @returns {boolean} Whether or not the variable is in TDZ of scopeVar.
     */
    function isInTdz(variable, scopeVar) {
        var outerDef = scopeVar.defs[0];
        var inner = getNameRange(variable);
        var outer = getNameRange(scopeVar);

        return (
            inner &&
            outer &&
            inner[1] < outer[0] &&

            // Excepts FunctionDeclaration if is {"hoist":"function"}.
            (options.hoist !== "functions" || !outerDef || outerDef.node.type !== "FunctionDeclaration")
        );
    }

    /**
     * Checks the current context for shadowed variables.
     * @param {Scope} scope - Fixme
     * @returns {void}
     */
    function checkForShadows(scope) {
        var variables = scope.variables;

        for (var i = 0; i < variables.length; ++i) {
            var variable = variables[i];

            // Skips "arguments" or variables of a class name in the class scope of ClassDeclaration.
            if (variable.identifiers.length === 0 ||
                isDuplicatedClassNameVariable(variable) ||
                isAllowed(variable)
            ) {
                continue;
            }

            // Gets shadowed variable.
            var shadowed = astUtils.getVariableByName(scope.upper, variable.name);

            if (shadowed &&
                (shadowed.identifiers.length > 0 || (options.builtinGlobals && "writeable" in shadowed)) &&
                !isOnInitializer(variable, shadowed) &&
                !(options.hoist !== "all" && isInTdz(variable, shadowed))
            ) {
                context.report({
                    node: variable.identifiers[0],
                    message: "'{{name}}' is already declared in the upper scope.",
                    data: variable
                });
            }
        }
    }

    return {
        "Program:exit": function() {
            var globalScope = context.getScope();
            var stack = globalScope.childScopes.slice();
            var scope;

            while (stack.length) {
                scope = stack.pop();
                stack.push.apply(stack, scope.childScopes);
                checkForShadows(scope);
            }
        }
    };

}

};

},{“../ast-utils”:124}],285:[function(require,module,exports){ /**

* @fileoverview Rule to check that spaced function application
* @author Matt DuVall <http://www.mattduvall.com>
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow spacing between `function` identifiers and their applications",
        category: "Stylistic Issues",
        recommended: false
    },

    fixable: "whitespace",
    schema: []
},

create: function(context) {

    var sourceCode = context.getSourceCode();

    /**
     * Check if open space is present in a function name
     * @param {ASTNode} node node to evaluate
     * @returns {void}
     * @private
     */
    function detectOpenSpaces(node) {
        var lastCalleeToken = sourceCode.getLastToken(node.callee),
            prevToken = lastCalleeToken,
            parenToken = sourceCode.getTokenAfter(lastCalleeToken);

        // advances to an open parenthesis.
        while (
            parenToken &&
            parenToken.range[1] < node.range[1] &&
            parenToken.value !== "("
        ) {
            prevToken = parenToken;
            parenToken = sourceCode.getTokenAfter(parenToken);
        }

        // look for a space between the callee and the open paren
        if (parenToken &&
            parenToken.range[1] < node.range[1] &&
            sourceCode.isSpaceBetweenTokens(prevToken, parenToken)
        ) {
            context.report({
                node: node,
                loc: lastCalleeToken.loc.start,
                message: "Unexpected space between function name and paren.",
                fix: function(fixer) {
                    return fixer.removeRange([prevToken.range[1], parenToken.range[0]]);
                }
            });
        }
    }

    return {
        CallExpression: detectOpenSpaces,
        NewExpression: detectOpenSpaces
    };

}

};

},{}],286:[function(require,module,exports){ /**

* @fileoverview Disallow sparse arrays
* @author Nicholas C. Zakas
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow sparse arrays",
        category: "Possible Errors",
        recommended: true
    },

    schema: []
},

create: function(context) {

    //--------------------------------------------------------------------------
    // Public
    //--------------------------------------------------------------------------

    return {

        ArrayExpression: function(node) {

            var emptySpot = node.elements.indexOf(null) > -1;

            if (emptySpot) {
                context.report(node, "Unexpected comma in middle of array.");
            }
        }

    };

}

};

},{}],287:[function(require,module,exports){ /**

* @fileoverview Rule to check for properties whose identifier ends with the string Sync
* @author Matt DuVall<http://mattduvall.com/>
*/

/* jshint node:true */

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow synchronous methods",
        category: "Node.js and CommonJS",
        recommended: false
    },

    schema: []
},

create: function(context) {

    return {

        MemberExpression: function(node) {
            var propertyName = node.property.name,
                syncRegex = /.*Sync$/;

            if (syncRegex.exec(propertyName) !== null) {
                context.report(node, "Unexpected sync method: '" + propertyName + "'.");
            }
        }
    };

}

};

},{}],288:[function(require,module,exports){ /**

* @fileoverview Rule to flag use of ternary operators.
* @author Ian Christian Myers
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow ternary operators",
        category: "Stylistic Issues",
        recommended: false
    },

    schema: []
},

create: function(context) {

    return {

        ConditionalExpression: function(node) {
            context.report(node, "Ternary operator used.");
        }

    };

}

};

},{}],289:[function(require,module,exports){ /**

* @fileoverview A rule to disallow using `this`/`super` before `super()`.
* @author Toru Nagashima
*/

“use strict”;

//—————————————————————————— // Requirements //——————————————————————————

var astUtils = require(“../ast-utils”);

//—————————————————————————— // Helpers //——————————————————————————

/**

* Checks whether or not a given node is a constructor.
* @param {ASTNode} node - A node to check. This node type is one of
*   `Program`, `FunctionDeclaration`, `FunctionExpression`, and
*   `ArrowFunctionExpression`.
* @returns {boolean} `true` if the node is a constructor.
*/

function isConstructorFunction(node) {

return (
    node.type === "FunctionExpression" &&
    node.parent.type === "MethodDefinition" &&
    node.parent.kind === "constructor"
);

}

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow `this`/`super` before calling `super()` in constructors",
        category: "ECMAScript 6",
        recommended: true
    },

    schema: []
},

create: function(context) {

    /*
     * Information for each constructor.
     * - upper:      Information of the upper constructor.
     * - hasExtends: A flag which shows whether the owner class has a valid
     *   `extends` part.
     * - scope:      The scope of the owner class.
     * - codePath:   The code path of this constructor.
     */
    var funcInfo = null;

    /*
     * Information for each code path segment.
     * Each key is the id of a code path segment.
     * Each value is an object:
     * - superCalled:  The flag which shows `super()` called in all code paths.
     * - invalidNodes: The array of invalid ThisExpression and Super nodes.
     */
    var segInfoMap = Object.create(null);

    /**
     * Gets whether or not `super()` is called in a given code path segment.
     * @param {CodePathSegment} segment - A code path segment to get.
     * @returns {boolean} `true` if `super()` is called.
     */
    function isCalled(segment) {
        return !segment.reachable || segInfoMap[segment.id].superCalled;
    }

    /**
     * Checks whether or not this is in a constructor.
     * @returns {boolean} `true` if this is in a constructor.
     */
    function isInConstructorOfDerivedClass() {
        return Boolean(funcInfo && funcInfo.isConstructor && funcInfo.hasExtends);
    }

    /**
     * Checks whether or not this is before `super()` is called.
     * @returns {boolean} `true` if this is before `super()` is called.
     */
    function isBeforeCallOfSuper() {
        return (
            isInConstructorOfDerivedClass(funcInfo) &&
            !funcInfo.codePath.currentSegments.every(isCalled)
        );
    }

    /**
     * Sets a given node as invalid.
     * @param {ASTNode} node - A node to set as invalid. This is one of
     *      a ThisExpression and a Super.
     * @returns {void}
     */
    function setInvalid(node) {
        var segments = funcInfo.codePath.currentSegments;

        for (var i = 0; i < segments.length; ++i) {
            var segment = segments[i];

            if (segment.reachable) {
                segInfoMap[segment.id].invalidNodes.push(node);
            }
        }
    }

    /**
     * Sets the current segment as `super` was called.
     * @returns {void}
     */
    function setSuperCalled() {
        var segments = funcInfo.codePath.currentSegments;

        for (var i = 0; i < segments.length; ++i) {
            var segment = segments[i];

            if (segment.reachable) {
                segInfoMap[segment.id].superCalled = true;
            }
        }
    }

    return {

        /**
         * Adds information of a constructor into the stack.
         * @param {CodePath} codePath - A code path which was started.
         * @param {ASTNode} node - The current node.
         * @returns {void}
         */
        onCodePathStart: function(codePath, node) {
            if (isConstructorFunction(node)) {

                // Class > ClassBody > MethodDefinition > FunctionExpression
                var classNode = node.parent.parent.parent;

                funcInfo = {
                    upper: funcInfo,
                    isConstructor: true,
                    hasExtends: Boolean(
                        classNode.superClass &&
                        !astUtils.isNullOrUndefined(classNode.superClass)
                    ),
                    codePath: codePath
                };
            } else {
                funcInfo = {
                    upper: funcInfo,
                    isConstructor: false,
                    hasExtends: false,
                    codePath: codePath
                };
            }
        },

        /**
         * Removes the top of stack item.
         *
         * And this treverses all segments of this code path then reports every
         * invalid node.
         *
         * @param {CodePath} codePath - A code path which was ended.
         * @param {ASTNode} node - The current node.
         * @returns {void}
         */
        onCodePathEnd: function(codePath) {
            var isDerivedClass = funcInfo.hasExtends;

            funcInfo = funcInfo.upper;
            if (!isDerivedClass) {
                return;
            }

            codePath.traverseSegments(function(segment, controller) {
                var info = segInfoMap[segment.id];

                for (var i = 0; i < info.invalidNodes.length; ++i) {
                    var invalidNode = info.invalidNodes[i];

                    context.report({
                        message: "'{{kind}}' is not allowed before 'super()'.",
                        node: invalidNode,
                        data: {
                            kind: invalidNode.type === "Super" ? "super" : "this"
                        }
                    });
                }

                if (info.superCalled) {
                    controller.skip();
                }
            });
        },

        /**
         * Initialize information of a given code path segment.
         * @param {CodePathSegment} segment - A code path segment to initialize.
         * @returns {void}
         */
        onCodePathSegmentStart: function(segment) {
            if (!isInConstructorOfDerivedClass(funcInfo)) {
                return;
            }

            // Initialize info.
            segInfoMap[segment.id] = {
                superCalled: (
                    segment.prevSegments.length > 0 &&
                    segment.prevSegments.every(isCalled)
                ),
                invalidNodes: []
            };
        },

        /**
         * Update information of the code path segment when a code path was
         * looped.
         * @param {CodePathSegment} fromSegment - The code path segment of the
         *      end of a loop.
         * @param {CodePathSegment} toSegment - A code path segment of the head
         *      of a loop.
         * @returns {void}
         */
        onCodePathSegmentLoop: function(fromSegment, toSegment) {
            if (!isInConstructorOfDerivedClass(funcInfo)) {
                return;
            }

            // Update information inside of the loop.
            funcInfo.codePath.traverseSegments(
                {first: toSegment, last: fromSegment},
                function(segment, controller) {
                    var info = segInfoMap[segment.id];

                    if (info.superCalled) {
                        info.invalidNodes = [];
                        controller.skip();
                    } else if (
                        segment.prevSegments.length > 0 &&
                        segment.prevSegments.every(isCalled)
                    ) {
                        info.superCalled = true;
                        info.invalidNodes = [];
                    }
                }
            );
        },

        /**
         * Reports if this is before `super()`.
         * @param {ASTNode} node - A target node.
         * @returns {void}
         */
        ThisExpression: function(node) {
            if (isBeforeCallOfSuper()) {
                setInvalid(node);
            }
        },

        /**
         * Reports if this is before `super()`.
         * @param {ASTNode} node - A target node.
         * @returns {void}
         */
        Super: function(node) {
            if (!astUtils.isCallee(node) && isBeforeCallOfSuper()) {
                setInvalid(node);
            }
        },

        /**
         * Marks `super()` called.
         * @param {ASTNode} node - A target node.
         * @returns {void}
         */
        "CallExpression:exit": function(node) {
            if (node.callee.type === "Super" && isBeforeCallOfSuper()) {
                setSuperCalled();
            }
        },

        /**
         * Resets state.
         * @returns {void}
         */
        "Program:exit": function() {
            segInfoMap = Object.create(null);
        }
    };
}

};

},{“../ast-utils”:124}],290:[function(require,module,exports){ /**

* @fileoverview Rule to restrict what can be thrown as an exception.
* @author Dieter Oberkofler
*/

“use strict”;

//—————————————————————————— // Helpers //——————————————————————————

/**

* Determine if a node has a possiblity to be an Error object
* @param  {ASTNode}  node  ASTNode to check
* @returns {boolean}       True if there is a chance it contains an Error obj
*/

function couldBeError(node) {

switch (node.type) {
    case "Identifier":
    case "CallExpression":
    case "NewExpression":
    case "MemberExpression":
    case "TaggedTemplateExpression":
    case "YieldExpression":
        return true; // possibly an error object.

    case "AssignmentExpression":
        return couldBeError(node.right);

    case "SequenceExpression":
        var exprs = node.expressions;

        return exprs.length !== 0 && couldBeError(exprs[exprs.length - 1]);

    case "LogicalExpression":
        return couldBeError(node.left) || couldBeError(node.right);

    case "ConditionalExpression":
        return couldBeError(node.consequent) || couldBeError(node.alternate);

    default:
        return false;
}

}

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow throwing literals as exceptions",
        category: "Best Practices",
        recommended: false
    },

    schema: []
},

create: function(context) {

    return {

        ThrowStatement: function(node) {
            if (!couldBeError(node.argument)) {
                context.report(node, "Expected an object to be thrown.");
            } else if (node.argument.type === "Identifier") {
                if (node.argument.name === "undefined") {
                    context.report(node, "Do not throw undefined.");
                }
            }

        }

    };

}

};

},{}],291:[function(require,module,exports){ /**

* @fileoverview Disallow trailing spaces at the end of lines.
* @author Nodeca Team <https://github.com/nodeca>
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow trailing whitespace at the end of lines",
        category: "Stylistic Issues",
        recommended: false
    },

    fixable: "whitespace",

    schema: [
        {
            type: "object",
            properties: {
                skipBlankLines: {
                    type: "boolean"
                }
            },
            additionalProperties: false
        }
    ]
},

create: function(context) {
    var sourceCode = context.getSourceCode();

    var BLANK_CLASS = "[ \t\u00a0\u2000-\u200b\u2028\u2029\u3000]",
        SKIP_BLANK = "^" + BLANK_CLASS + "*$",
        NONBLANK = BLANK_CLASS + "+$";

    var options = context.options[0] || {},
        skipBlankLines = options.skipBlankLines || false;

    /**
     * Report the error message
     * @param {ASTNode} node node to report
     * @param {int[]} location range information
     * @param {int[]} fixRange Range based on the whole program
     * @returns {void}
     */
    function report(node, location, fixRange) {

        /*
         * Passing node is a bit dirty, because message data will contain big
         * text in `source`. But... who cares :) ?
         * One more kludge will not make worse the bloody wizardry of this
         * plugin.
         */
        context.report({
            node: node,
            loc: location,
            message: "Trailing spaces not allowed.",
            fix: function(fixer) {
                return fixer.removeRange(fixRange);
            }
        });
    }

    //--------------------------------------------------------------------------
    // Public
    //--------------------------------------------------------------------------

    return {

        Program: function checkTrailingSpaces(node) {

            // Let's hack. Since Espree does not return whitespace nodes,
            // fetch the source code and do matching via regexps.

            var re = new RegExp(NONBLANK),
                skipMatch = new RegExp(SKIP_BLANK),
                matches,
                lines = sourceCode.lines,
                linebreaks = sourceCode.getText().match(/\r\n|\r|\n|\u2028|\u2029/g),
                location,
                totalLength = 0,
                rangeStart,
                rangeEnd,
                fixRange = [],
                containingNode;

            for (var i = 0, ii = lines.length; i < ii; i++) {
                matches = re.exec(lines[i]);

                // Always add linebreak length to line length to accommodate for line break (\n or \r\n)
                // Because during the fix time they also reserve one spot in the array.
                // Usually linebreak length is 2 for \r\n (CRLF) and 1 for \n (LF)
                var linebreakLength = linebreaks && linebreaks[i] ? linebreaks[i].length : 1;
                var lineLength = lines[i].length + linebreakLength;

                if (matches) {
                    location = {
                        line: i + 1,
                        column: matches.index
                    };

                    rangeStart = totalLength + location.column;
                    rangeEnd = totalLength + lineLength - linebreakLength;
                    containingNode = sourceCode.getNodeByRangeIndex(rangeStart);

                    if (containingNode && containingNode.type === "TemplateElement" &&
                      rangeStart > containingNode.parent.range[0] &&
                      rangeEnd < containingNode.parent.range[1]) {
                        totalLength += lineLength;
                        continue;
                    }

                    // If the line has only whitespace, and skipBlankLines
                    // is true, don't report it
                    if (skipBlankLines && skipMatch.test(lines[i])) {
                        continue;
                    }

                    fixRange = [rangeStart, rangeEnd];
                    report(node, location, fixRange);
                }

                totalLength += lineLength;
            }
        }

    };
}

};

},{}],292:[function(require,module,exports){ /**

* @fileoverview Rule to flag when initializing to undefined
* @author Ilya Volodin
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow initializing variables to `undefined`",
        category: "Variables",
        recommended: false
    },

    schema: []
},

create: function(context) {

    return {

        VariableDeclarator: function(node) {
            var name = node.id.name,
                init = node.init && node.init.name;

            if (init === "undefined" && node.parent.kind !== "const") {
                context.report(node, "It's not necessary to initialize '{{name}}' to undefined.", { name: name });
            }
        }
    };

}

};

},{}],293:[function(require,module,exports){ /**

* @fileoverview Rule to flag references to undeclared variables.
* @author Mark Macdonald
*/

“use strict”;

//—————————————————————————— // Helpers //——————————————————————————

/**

* Checks if the given node is the argument of a typeof operator.
* @param {ASTNode} node The AST node being checked.
* @returns {boolean} Whether or not the node is the argument of a typeof operator.
*/

function hasTypeOfOperator(node) {

var parent = node.parent;

return parent.type === "UnaryExpression" && parent.operator === "typeof";

}

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow the use of undeclared variables unless mentioned in `/*global */` comments",
        category: "Variables",
        recommended: true
    },

    schema: [
        {
            type: "object",
            properties: {
                typeof: {
                    type: "boolean"
                }
            },
            additionalProperties: false
        }
    ]
},

create: function(context) {
    var options = context.options[0];
    var considerTypeOf = options && options.typeof === true || false;

    return {
        "Program:exit": function(/* node */) {
            var globalScope = context.getScope();

            globalScope.through.forEach(function(ref) {
                var identifier = ref.identifier;

                if (!considerTypeOf && hasTypeOfOperator(identifier)) {
                    return;
                }

                context.report({
                    node: identifier,
                    message: "'{{name}}' is not defined.",
                    data: identifier
                });
            });
        }
    };
}

};

},{}],294:[function(require,module,exports){ /**

* @fileoverview Rule to flag references to the undefined variable.
* @author Michael Ficarra
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow the use of `undefined` as an identifier",
        category: "Variables",
        recommended: false
    },

    schema: []
},

create: function(context) {

    return {

        Identifier: function(node) {
            if (node.name === "undefined") {
                var parent = context.getAncestors().pop();

                if (!parent || parent.type !== "MemberExpression" || node !== parent.property || parent.computed) {
                    context.report(node, "Unexpected use of undefined.");
                }
            }
        }
    };

}

};

},{}],295:[function(require,module,exports){ /**

* @fileoverview Rule to flag trailing underscores in variable declarations.
* @author Matt DuVall <http://www.mattduvall.com>
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow dangling underscores in identifiers",
        category: "Stylistic Issues",
        recommended: false
    },

    schema: [
        {
            type: "object",
            properties: {
                allow: {
                    type: "array",
                    items: {
                        type: "string"
                    }
                },
                allowAfterThis: {
                    type: "boolean"
                }
            },
            additionalProperties: false
        }
    ]
},

create: function(context) {

    var options = context.options[0] || {};
    var ALLOWED_VARIABLES = options.allow ? options.allow : [];
    var allowAfterThis = typeof options.allowAfterThis !== "undefined" ? options.allowAfterThis : false;

    //-------------------------------------------------------------------------
    // Helpers
    //-------------------------------------------------------------------------

    /**
     * Check if identifier is present inside the allowed option
     * @param {string} identifier name of the node
     * @returns {boolean} true if its is present
     * @private
     */
    function isAllowed(identifier) {
        return ALLOWED_VARIABLES.some(function(ident) {
            return ident === identifier;
        });
    }

    /**
     * Check if identifier has a underscore at the end
     * @param {ASTNode} identifier node to evaluate
     * @returns {boolean} true if its is present
     * @private
     */
    function hasTrailingUnderscore(identifier) {
        var len = identifier.length;

        return identifier !== "_" && (identifier[0] === "_" || identifier[len - 1] === "_");
    }

    /**
     * Check if identifier is a special case member expression
     * @param {ASTNode} identifier node to evaluate
     * @returns {boolean} true if its is a special case
     * @private
     */
    function isSpecialCaseIdentifierForMemberExpression(identifier) {
        return identifier === "__proto__";
    }

    /**
     * Check if identifier is a special case variable expression
     * @param {ASTNode} identifier node to evaluate
     * @returns {boolean} true if its is a special case
     * @private
     */
    function isSpecialCaseIdentifierInVariableExpression(identifier) {

        // Checks for the underscore library usage here
        return identifier === "_";
    }

    /**
     * Check if function has a underscore at the end
     * @param {ASTNode} node node to evaluate
     * @returns {void}
     * @private
     */
    function checkForTrailingUnderscoreInFunctionDeclaration(node) {
        if (node.id) {
            var identifier = node.id.name;

            if (typeof identifier !== "undefined" && hasTrailingUnderscore(identifier) && !isAllowed(identifier)) {
                context.report(node, "Unexpected dangling '_' in '" + identifier + "'.");
            }
        }
    }

    /**
     * Check if variable expression has a underscore at the end
     * @param {ASTNode} node node to evaluate
     * @returns {void}
     * @private
     */
    function checkForTrailingUnderscoreInVariableExpression(node) {
        var identifier = node.id.name;

        if (typeof identifier !== "undefined" && hasTrailingUnderscore(identifier) &&
            !isSpecialCaseIdentifierInVariableExpression(identifier) && !isAllowed(identifier)) {
            context.report(node, "Unexpected dangling '_' in '" + identifier + "'.");
        }
    }

    /**
     * Check if member expression has a underscore at the end
     * @param {ASTNode} node node to evaluate
     * @returns {void}
     * @private
     */
    function checkForTrailingUnderscoreInMemberExpression(node) {
        var identifier = node.property.name,
            isMemberOfThis = node.object.type === "ThisExpression";

        if (typeof identifier !== "undefined" && hasTrailingUnderscore(identifier) &&
            !(isMemberOfThis && allowAfterThis) &&
            !isSpecialCaseIdentifierForMemberExpression(identifier) && !isAllowed(identifier)) {
            context.report(node, "Unexpected dangling '_' in '" + identifier + "'.");
        }
    }

    //--------------------------------------------------------------------------
    // Public API
    //--------------------------------------------------------------------------

    return {
        FunctionDeclaration: checkForTrailingUnderscoreInFunctionDeclaration,
        VariableDeclarator: checkForTrailingUnderscoreInVariableExpression,
        MemberExpression: checkForTrailingUnderscoreInMemberExpression
    };

}

};

},{}],296:[function(require,module,exports){ /**

* @fileoverview Rule to spot scenarios where a newline looks like it is ending a statement, but is not.
* @author Glen Mailer
*/

“use strict”;

//—————————————————————————— // Rule Definition //—————————————————————————— module.exports = {

meta: {
    docs: {
        description: "disallow confusing multiline expressions",
        category: "Possible Errors",
        recommended: true
    },

    schema: []
},

create: function(context) {

    var FUNCTION_MESSAGE = "Unexpected newline between function and ( of function call.";
    var PROPERTY_MESSAGE = "Unexpected newline between object and [ of property access.";
    var TAGGED_TEMPLATE_MESSAGE = "Unexpected newline between template tag and template literal.";

    var sourceCode = context.getSourceCode();

    /**
     * Check to see if there is a newline between the node and the following open bracket
     * line's expression
     * @param {ASTNode} node The node to check.
     * @param {string} msg The error message to use.
     * @returns {void}
     * @private
     */
    function checkForBreakAfter(node, msg) {
        var nodeExpressionEnd = node;
        var openParen = sourceCode.getTokenAfter(node);

        // Move along until the end of the wrapped expression
        while (openParen.value === ")") {
            nodeExpressionEnd = openParen;
            openParen = sourceCode.getTokenAfter(nodeExpressionEnd);
        }

        if (openParen.loc.start.line !== nodeExpressionEnd.loc.end.line) {
            context.report(node, openParen.loc.start, msg, { char: openParen.value });
        }
    }

    //--------------------------------------------------------------------------
    // Public API
    //--------------------------------------------------------------------------

    return {

        MemberExpression: function(node) {
            if (!node.computed) {
                return;
            }
            checkForBreakAfter(node.object, PROPERTY_MESSAGE);
        },

        TaggedTemplateExpression: function(node) {
            if (node.tag.loc.end.line === node.quasi.loc.start.line) {
                return;
            }
            context.report(node, node.loc.start, TAGGED_TEMPLATE_MESSAGE);
        },

        CallExpression: function(node) {
            if (node.arguments.length === 0) {
                return;
            }
            checkForBreakAfter(node.callee, FUNCTION_MESSAGE);
        }
    };

}

};

},{}],297:[function(require,module,exports){ /**

* @fileoverview Rule to disallow use of unmodified expressions in loop conditions
* @author Toru Nagashima
*/

“use strict”;

//—————————————————————————— // Requirements //——————————————————————————

var Map = require(“es6-map”),

Traverser = require("../util/traverser"),
astUtils = require("../ast-utils");

//—————————————————————————— // Helpers //——————————————————————————

var pushAll = Function.apply.bind(Array.prototype.push); var SENTINEL_PATTERN = /(?:(?:Call|Class|Function|Member|New|Yield)Expression|Statement|Declaration)$/; var LOOP_PATTERN = /^(?:DoWhile|For|While)Statement$/; var GROUP_PATTERN = /^(?:BinaryExpression|ConditionalExpression)$/; var SKIP_PATTERN = /^(?:ArrowFunction|Class|Function)Expression$/; var DYNAMIC_PATTERN = /^(?:Call|Member|New|TaggedTemplate|Yield)Expression$/;

/**

* @typedef {object} LoopConditionInfo
* @property {escope.Reference} reference - The reference.
* @property {ASTNode} group - BinaryExpression or ConditionalExpression nodes
*      that the reference is belonging to.
* @property {function} isInLoop - The predicate which checks a given reference
*      is in this loop.
* @property {boolean} modified - The flag that the reference is modified in
*      this loop.
*/

/**

* Checks whether or not a given reference is a write reference.
*
* @param {escope.Reference} reference - A reference to check.
* @returns {boolean} `true` if the reference is a write reference.
*/

function isWriteReference(reference) {

if (reference.init) {
    var def = reference.resolved && reference.resolved.defs[0];

    if (!def || def.type !== "Variable" || def.parent.kind !== "var") {
        return false;
    }
}
return reference.isWrite();

}

/**

* Checks whether or not a given loop condition info does not have the modified
* flag.
*
* @param {LoopConditionInfo} condition - A loop condition info to check.
* @returns {boolean} `true` if the loop condition info is "unmodified".
*/

function isUnmodified(condition) {

return !condition.modified;

}

/**

* Checks whether or not a given loop condition info does not have the modified
* flag and does not have the group this condition belongs to.
*
* @param {LoopConditionInfo} condition - A loop condition info to check.
* @returns {boolean} `true` if the loop condition info is "unmodified".
*/

function isUnmodifiedAndNotBelongToGroup(condition) {

return !(condition.modified || condition.group);

}

/**

* Checks whether or not a given reference is inside of a given node.
*
* @param {ASTNode} node - A node to check.
* @param {escope.Reference} reference - A reference to check.
* @returns {boolean} `true` if the reference is inside of the node.
*/

function isInRange(node, reference) {

var or = node.range;
var ir = reference.identifier.range;

return or[0] <= ir[0] && ir[1] <= or[1];

}

/**

* Checks whether or not a given reference is inside of a loop node's condition.
*
* @param {ASTNode} node - A node to check.
* @param {escope.Reference} reference - A reference to check.
* @returns {boolean} `true` if the reference is inside of the loop node's
*      condition.
*/

var isInLoop = {

WhileStatement: isInRange,
DoWhileStatement: isInRange,
ForStatement: function(node, reference) {
    return (
        isInRange(node, reference) &&
        !(node.init && isInRange(node.init, reference))
    );
}

};

/**

* Checks whether or not a given group node has any dynamic elements.
*
* @param {ASTNode} root - A node to check.
*      This node is one of BinaryExpression or ConditionalExpression.
* @returns {boolean} `true` if the node is dynamic.
*/

function hasDynamicExpressions(root) {

var retv = false,
    traverser = new Traverser();

traverser.traverse(root, {
    enter: function(node) {
        if (DYNAMIC_PATTERN.test(node.type)) {
            retv = true;
            this.break();
        } else if (SKIP_PATTERN.test(node.type)) {
            this.skip();
        }
    }
});

return retv;

}

/**

* Creates the loop condition information from a given reference.
*
* @param {escope.Reference} reference - A reference to create.
* @returns {LoopConditionInfo|null} Created loop condition info, or null.
*/

function toLoopCondition(reference) {

if (reference.init) {
    return null;
}

var group = null;
var child = reference.identifier;
var node = child.parent;

while (node) {
    if (SENTINEL_PATTERN.test(node.type)) {
        if (LOOP_PATTERN.test(node.type) && node.test === child) {

            // This reference is inside of a loop condition.
            return {
                reference: reference,
                group: group,
                isInLoop: isInLoop[node.type].bind(null, node),
                modified: false
            };
        }

        // This reference is outside of a loop condition.
        break;
    }

    /*
     * If it's inside of a group, OK if either operand is modified.
     * So stores the group this reference belongs to.
     */
    if (GROUP_PATTERN.test(node.type)) {

        // If this expression is dynamic, no need to check.
        if (hasDynamicExpressions(node)) {
            break;
        } else {
            group = node;
        }
    }

    child = node;
    node = node.parent;
}

return null;

}

/**

* Gets the function which encloses a given reference.
* This supports only FunctionDeclaration.
*
* @param {escope.Reference} reference - A reference to get.
* @returns {ASTNode|null} The function node or null.
*/

function getEncloseFunctionDeclaration(reference) {

var node = reference.identifier;

while (node) {
    if (node.type === "FunctionDeclaration") {
        return node.id ? node : null;
    }

    node = node.parent;
}

return null;

}

/**

* Updates the "modified" flags of given loop conditions with given modifiers.
*
* @param {LoopConditionInfo[]} conditions - The loop conditions to be updated.
* @param {escope.Reference[]} modifiers - The references to update.
* @returns {void}
*/

function updateModifiedFlag(conditions, modifiers) {

var funcNode, funcVar;

for (var i = 0; i < conditions.length; ++i) {
    var condition = conditions[i];

    for (var j = 0; !condition.modified && j < modifiers.length; ++j) {
        var modifier = modifiers[j],
            inLoop;

        /*
         * Besides checking for the condition being in the loop, we want to
         * check the function that this modifier is belonging to is called
         * in the loop.
         * FIXME: This should probably be extracted to a function.
         */
        inLoop = condition.isInLoop(modifier) || Boolean(
            (funcNode = getEncloseFunctionDeclaration(modifier)) &&
            (funcVar = astUtils.getVariableByName(modifier.from.upper, funcNode.id.name)) &&
            funcVar.references.some(condition.isInLoop)
        );
        condition.modified = inLoop;
    }
}

}

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow unmodified loop conditions",
        category: "Best Practices",
        recommended: false
    },

    schema: []
},

create: function(context) {
    var groupMap = null;

    /**
     * Reports a given condition info.
     *
     * @param {LoopConditionInfo} condition - A loop condition info to report.
     * @returns {void}
     */
    function report(condition) {
        var node = condition.reference.identifier;

        context.report({
            node: node,
            message: "'{{name}}' is not modified in this loop.",
            data: node
        });
    }

    /**
     * Registers given conditions to the group the condition belongs to.
     *
     * @param {LoopConditionInfo[]} conditions - A loop condition info to
     *      register.
     * @returns {void}
     */
    function registerConditionsToGroup(conditions) {
        for (var i = 0; i < conditions.length; ++i) {
            var condition = conditions[i];

            if (condition.group) {
                var group = groupMap.get(condition.group);

                if (!group) {
                    group = [];
                    groupMap.set(condition.group, group);
                }
                group.push(condition);
            }
        }
    }

    /**
     * Reports references which are inside of unmodified groups.
     *
     * @param {LoopConditionInfo[]} conditions - A loop condition info to report.
     * @returns {void}
     */
    function checkConditionsInGroup(conditions) {
        if (conditions.every(isUnmodified)) {
            conditions.forEach(report);
        }
    }

    /**
     * Finds unmodified references which are inside of a loop condition.
     * Then reports the references which are outside of groups.
     *
     * @param {escope.Variable} variable - A variable to report.
     * @returns {void}
     */
    function checkReferences(variable) {

        // Gets references that exist in loop conditions.
        var conditions = variable
            .references
            .map(toLoopCondition)
            .filter(Boolean);

        if (conditions.length === 0) {
            return;
        }

        // Registers the conditions to belonging groups.
        registerConditionsToGroup(conditions);

        // Check the conditions are modified.
        var modifiers = variable.references.filter(isWriteReference);

        if (modifiers.length > 0) {
            updateModifiedFlag(conditions, modifiers);
        }

        /*
         * Reports the conditions which are not belonging to groups.
         * Others will be reported after all variables are done.
         */
        conditions
            .filter(isUnmodifiedAndNotBelongToGroup)
            .forEach(report);
    }

    return {
        "Program:exit": function() {
            var queue = [context.getScope()];

            groupMap = new Map();

            var scope;

            while ((scope = queue.pop())) {
                pushAll(queue, scope.childScopes);
                scope.variables.forEach(checkReferences);
            }

            groupMap.forEach(checkConditionsInGroup);
            groupMap = null;
        }
    };
}

};

},{“../ast-utils”:124,“../util/traverser”:365,“es6-map”:59}],298:[function(require,module,exports){ /**

* @fileoverview Rule to flag no-unneeded-ternary
* @author Gyandeep Singh
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow ternary operators when simpler alternatives exist",
        category: "Stylistic Issues",
        recommended: false
    },

    schema: [
        {
            type: "object",
            properties: {
                defaultAssignment: {
                    type: "boolean"
                }
            },
            additionalProperties: false
        }
    ]
},

create: function(context) {
    var options = context.options[0] || {};
    var defaultAssignment = options.defaultAssignment !== false;

    /**
     * Test if the node is a boolean literal
     * @param {ASTNode} node - The node to report.
     * @returns {boolean} True if the its a boolean literal
     * @private
     */
    function isBooleanLiteral(node) {
        return node.type === "Literal" && typeof node.value === "boolean";
    }

    /**
     * Test if the node matches the pattern id ? id : expression
     * @param {ASTNode} node - The ConditionalExpression to check.
     * @returns {boolean} True if the pattern is matched, and false otherwise
     * @private
     */
    function matchesDefaultAssignment(node) {
        return node.test.type === "Identifier" &&
               node.consequent.type === "Identifier" &&
               node.test.name === node.consequent.name;
    }

    return {

        ConditionalExpression: function(node) {
            if (isBooleanLiteral(node.alternate) && isBooleanLiteral(node.consequent)) {
                context.report(node, node.consequent.loc.start, "Unnecessary use of boolean literals in conditional expression");
            } else if (!defaultAssignment && matchesDefaultAssignment(node)) {
                context.report(node, node.consequent.loc.start, "Unnecessary use of conditional expression for default assignment");
            }
        }
    };
}

};

},{}],299:[function(require,module,exports){ /**

* @fileoverview Checks for unreachable code due to return, throws, break, and continue.
* @author Joel Feenstra
*/

“use strict”;

//—————————————————————————— // Helpers //——————————————————————————

/**

* Checks whether or not a given variable declarator has the initializer.
* @param {ASTNode} node - A VariableDeclarator node to check.
* @returns {boolean} `true` if the node has the initializer.
*/

function isInitialized(node) {

return Boolean(node.init);

}

/**

* Checks whether or not a given code path segment is unreachable.
* @param {CodePathSegment} segment - A CodePathSegment to check.
* @returns {boolean} `true` if the segment is unreachable.
*/

function isUnreachable(segment) {

return !segment.reachable;

}

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow unreachable code after `return`, `throw`, `continue`, and `break` statements",
        category: "Possible Errors",
        recommended: true
    },

    schema: []
},

create: function(context) {
    var currentCodePath = null;

    /**
     * Reports a given node if it's unreachable.
     * @param {ASTNode} node - A statement node to report.
     * @returns {void}
     */
    function reportIfUnreachable(node) {
        if (currentCodePath.currentSegments.every(isUnreachable)) {
            context.report({message: "Unreachable code.", node: node});
        }
    }

    return {

        // Manages the current code path.
        onCodePathStart: function(codePath) {
            currentCodePath = codePath;
        },

        onCodePathEnd: function() {
            currentCodePath = currentCodePath.upper;
        },

        // Registers for all statement nodes (excludes FunctionDeclaration).
        BlockStatement: reportIfUnreachable,
        BreakStatement: reportIfUnreachable,
        ClassDeclaration: reportIfUnreachable,
        ContinueStatement: reportIfUnreachable,
        DebuggerStatement: reportIfUnreachable,
        DoWhileStatement: reportIfUnreachable,
        EmptyStatement: reportIfUnreachable,
        ExpressionStatement: reportIfUnreachable,
        ForInStatement: reportIfUnreachable,
        ForOfStatement: reportIfUnreachable,
        ForStatement: reportIfUnreachable,
        IfStatement: reportIfUnreachable,
        ImportDeclaration: reportIfUnreachable,
        LabeledStatement: reportIfUnreachable,
        ReturnStatement: reportIfUnreachable,
        SwitchStatement: reportIfUnreachable,
        ThrowStatement: reportIfUnreachable,
        TryStatement: reportIfUnreachable,

        VariableDeclaration: function(node) {
            if (node.kind !== "var" || node.declarations.some(isInitialized)) {
                reportIfUnreachable(node);
            }
        },

        WhileStatement: reportIfUnreachable,
        WithStatement: reportIfUnreachable,
        ExportNamedDeclaration: reportIfUnreachable,
        ExportDefaultDeclaration: reportIfUnreachable,
        ExportAllDeclaration: reportIfUnreachable
    };
}

};

},{}],300:[function(require,module,exports){ /**

* @fileoverview Rule to flag unsafe statements in finally block
* @author Onur Temizkan
*/

“use strict”;

//—————————————————————————— // Helpers //——————————————————————————

var SENTINEL_NODE_TYPE_RETURN_THROW = /^(?:Program|(?:Function|Class)(?:Declaration|Expression)|ArrowFunctionExpression)$/; var SENTINEL_NODE_TYPE_BREAK = /^(?:Program|(?:Function|Class)(?:Declaration|Expression)|ArrowFunctionExpression|DoWhileStatement|WhileStatement|ForOfStatement|ForInStatement|ForStatement|SwitchStatement)$/; var SENTINEL_NODE_TYPE_CONTINUE = /^(?:Program|(?:Function|Class)(?:Declaration|Expression)|ArrowFunctionExpression|DoWhileStatement|WhileStatement|ForOfStatement|ForInStatement|ForStatement)$/;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow control flow statements in finally blocks",
        category: "Possible Errors",
        recommended: false
    }
},
create: function(context) {

    /**
     * Checks if the node is the finalizer of a TryStatement
     *
     * @param {ASTNode} node - node to check.
     * @returns {Boolean} - true if the node is the finalizer of a TryStatement
     */
    function isFinallyBlock(node) {
        return node.parent.type === "TryStatement" && node.parent.finalizer === node;
    }

    /**
     * Climbs up the tree if the node is not a sentinel node
     *
     * @param {ASTNode} node - node to check.
     * @param {String} label - label of the break or continue statement
     * @returns {Boolean} - return whether the node is a finally block or a sentinel node
     */
    function isInFinallyBlock(node, label) {
        var labelInside = false;
        var sentinelNodeType;

        if (node.type === "BreakStatement" && !node.label) {
            sentinelNodeType = SENTINEL_NODE_TYPE_BREAK;
        } else if (node.type === "ContinueStatement") {
            sentinelNodeType = SENTINEL_NODE_TYPE_CONTINUE;
        } else {
            sentinelNodeType = SENTINEL_NODE_TYPE_RETURN_THROW;
        }

        while (node && !sentinelNodeType.test(node.type)) {
            if (node.parent.label && label && (node.parent.label.name === label.name)) {
                labelInside = true;
            }
            if (isFinallyBlock(node)) {
                if (label && labelInside) {
                    return false;
                }
                return true;
            }
            node = node.parent;
        }
        return false;
    }

    /**
     * Checks whether the possibly-unsafe statement is inside a finally block.
     *
     * @param {ASTNode} node - node to check.
     * @returns {void}
     */
    function check(node) {
        if (isInFinallyBlock(node, node.label)) {
            context.report({
                message: "Unsafe usage of " + node.type,
                node: node,
                line: node.loc.line,
                column: node.loc.column
            });
        }
    }

    return {
        ReturnStatement: check,
        ThrowStatement: check,
        BreakStatement: check,
        ContinueStatement: check
    };
}

};

},{}],301:[function(require,module,exports){ /**

* @fileoverview Flag expressions in statement position that do not side effect
* @author Michael Ficarra
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow unused expressions",
        category: "Best Practices",
        recommended: false
    },

    schema: [
        {
            type: "object",
            properties: {
                allowShortCircuit: {
                    type: "boolean"
                },
                allowTernary: {
                    type: "boolean"
                }
            },
            additionalProperties: false
        }
    ]
},

create: function(context) {
    var config = context.options[0] || {},
        allowShortCircuit = config.allowShortCircuit || false,
        allowTernary = config.allowTernary || false;

    /**
     * @param {ASTNode} node - any node
     * @returns {boolean} whether the given node structurally represents a directive
     */
    function looksLikeDirective(node) {
        return node.type === "ExpressionStatement" &&
            node.expression.type === "Literal" && typeof node.expression.value === "string";
    }

    /**
     * @param {Function} predicate - ([a] -> Boolean) the function used to make the determination
     * @param {a[]} list - the input list
     * @returns {a[]} the leading sequence of members in the given list that pass the given predicate
     */
    function takeWhile(predicate, list) {
        for (var i = 0, l = list.length; i < l; ++i) {
            if (!predicate(list[i])) {
                break;
            }
        }
        return [].slice.call(list, 0, i);
    }

    /**
     * @param {ASTNode} node - a Program or BlockStatement node
     * @returns {ASTNode[]} the leading sequence of directive nodes in the given node's body
     */
    function directives(node) {
        return takeWhile(looksLikeDirective, node.body);
    }

    /**
     * @param {ASTNode} node - any node
     * @param {ASTNode[]} ancestors - the given node's ancestors
     * @returns {boolean} whether the given node is considered a directive in its current position
     */
    function isDirective(node, ancestors) {
        var parent = ancestors[ancestors.length - 1],
            grandparent = ancestors[ancestors.length - 2];

        return (parent.type === "Program" || parent.type === "BlockStatement" &&
                (/Function/.test(grandparent.type))) &&
                directives(parent).indexOf(node) >= 0;
    }

    /**
     * Determines whether or not a given node is a valid expression. Recurses on short circuit eval and ternary nodes if enabled by flags.
     * @param {ASTNode} node - any node
     * @returns {boolean} whether the given node is a valid expression
     */
    function isValidExpression(node) {
        if (allowTernary) {

            // Recursive check for ternary and logical expressions
            if (node.type === "ConditionalExpression") {
                return isValidExpression(node.consequent) && isValidExpression(node.alternate);
            }
        }
        if (allowShortCircuit) {
            if (node.type === "LogicalExpression") {
                return isValidExpression(node.right);
            }
        }

        return /^(?:Assignment|Call|New|Update|Yield)Expression$/.test(node.type) ||
            (node.type === "UnaryExpression" && ["delete", "void"].indexOf(node.operator) >= 0);
    }

    return {
        ExpressionStatement: function(node) {
            if (!isValidExpression(node.expression) && !isDirective(node, context.getAncestors())) {
                context.report(node, "Expected an assignment or function call and instead saw an expression.");
            }
        }
    };

}

};

},{}],302:[function(require,module,exports){ /**

* @fileoverview Rule to disallow unused labels.
* @author Toru Nagashima
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow unused labels",
        category: "Best Practices",
        recommended: true
    },

    schema: []
},

create: function(context) {
    var scopeInfo = null;

    /**
     * Adds a scope info to the stack.
     *
     * @param {ASTNode} node - A node to add. This is a LabeledStatement.
     * @returns {void}
     */
    function enterLabeledScope(node) {
        scopeInfo = {
            label: node.label.name,
            used: false,
            upper: scopeInfo
        };
    }

    /**
     * Removes the top of the stack.
     * At the same time, this reports the label if it's never used.
     *
     * @param {ASTNode} node - A node to report. This is a LabeledStatement.
     * @returns {void}
     */
    function exitLabeledScope(node) {
        if (!scopeInfo.used) {
            context.report({
                node: node.label,
                message: "'{{name}}:' is defined but never used.",
                data: node.label
            });
        }

        scopeInfo = scopeInfo.upper;
    }

    /**
     * Marks the label of a given node as used.
     *
     * @param {ASTNode} node - A node to mark. This is a BreakStatement or
     *      ContinueStatement.
     * @returns {void}
     */
    function markAsUsed(node) {
        if (!node.label) {
            return;
        }

        var label = node.label.name;
        var info = scopeInfo;

        while (info) {
            if (info.label === label) {
                info.used = true;
                break;
            }
            info = info.upper;
        }
    }

    return {
        LabeledStatement: enterLabeledScope,
        "LabeledStatement:exit": exitLabeledScope,
        BreakStatement: markAsUsed,
        ContinueStatement: markAsUsed
    };
}

};

},{}],303:[function(require,module,exports){ /**

* @fileoverview Rule to flag declared but unused variables
* @author Ilya Volodin
*/

“use strict”;

//—————————————————————————— // Requirements //——————————————————————————

var lodash = require(“lodash”);

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow unused variables",
        category: "Variables",
        recommended: true
    },

    schema: [
        {
            oneOf: [
                {
                    enum: ["all", "local"]
                },
                {
                    type: "object",
                    properties: {
                        vars: {
                            enum: ["all", "local"]
                        },
                        varsIgnorePattern: {
                            type: "string"
                        },
                        args: {
                            enum: ["all", "after-used", "none"]
                        },
                        argsIgnorePattern: {
                            type: "string"
                        },
                        caughtErrors: {
                            enum: ["all", "none"]
                        },
                        caughtErrorsIgnorePattern: {
                            type: "string"
                        }
                    }
                }
            ]
        }
    ]
},

create: function(context) {

    var MESSAGE = "'{{name}}' is defined but never used";

    var config = {
        vars: "all",
        args: "after-used",
        caughtErrors: "none"
    };

    var firstOption = context.options[0];

    if (firstOption) {
        if (typeof firstOption === "string") {
            config.vars = firstOption;
        } else {
            config.vars = firstOption.vars || config.vars;
            config.args = firstOption.args || config.args;
            config.caughtErrors = firstOption.caughtErrors || config.caughtErrors;

            if (firstOption.varsIgnorePattern) {
                config.varsIgnorePattern = new RegExp(firstOption.varsIgnorePattern);
            }

            if (firstOption.argsIgnorePattern) {
                config.argsIgnorePattern = new RegExp(firstOption.argsIgnorePattern);
            }

            if (firstOption.caughtErrorsIgnorePattern) {
                config.caughtErrorsIgnorePattern = new RegExp(firstOption.caughtErrorsIgnorePattern);
            }
        }
    }

    //--------------------------------------------------------------------------
    // Helpers
    //--------------------------------------------------------------------------

    /**
     * Determines if a given variable is being exported from a module.
     * @param {Variable} variable - EScope variable object.
     * @returns {boolean} True if the variable is exported, false if not.
     * @private
     */
    function isExported(variable) {

        var definition = variable.defs[0];

        if (definition) {

            var node = definition.node;

            if (node.type === "VariableDeclarator") {
                node = node.parent;
            } else if (definition.type === "Parameter") {
                return false;
            }

            return node.parent.type.indexOf("Export") === 0;
        } else {
            return false;
        }
    }

    /**
     * Determines if a reference is a read operation.
     * @param {Reference} ref - An escope Reference
     * @returns {Boolean} whether the given reference represents a read operation
     * @private
     */
    function isReadRef(ref) {
        return ref.isRead();
    }

    /**
     * Determine if an identifier is referencing an enclosing function name.
     * @param {Reference} ref - The reference to check.
     * @param {ASTNode[]} nodes - The candidate function nodes.
     * @returns {boolean} True if it's a self-reference, false if not.
     * @private
     */
    function isSelfReference(ref, nodes) {
        var scope = ref.from;

        while (scope) {
            if (nodes.indexOf(scope.block) >= 0) {
                return true;
            }

            scope = scope.upper;
        }

        return false;
    }

    /**
     * Determines if the variable is used.
     * @param {Variable} variable - The variable to check.
     * @param {Reference[]} references - The variable references to check.
     * @returns {boolean} True if the variable is used
     */
    function isUsedVariable(variable) {
        var functionNodes = variable.defs.filter(function(def) {
                return def.type === "FunctionName";
            }).map(function(def) {
                return def.node;
            }),
            isFunctionDefinition = functionNodes.length > 0;

        return variable.references.some(function(ref) {
            return isReadRef(ref) && !(isFunctionDefinition && isSelfReference(ref, functionNodes));
        });
    }

    /**
     * Gets an array of variables without read references.
     * @param {Scope} scope - an escope Scope object.
     * @param {Variable[]} unusedVars - an array that saving result.
     * @returns {Variable[]} unused variables of the scope and descendant scopes.
     * @private
     */
    function collectUnusedVariables(scope, unusedVars) {
        var variables = scope.variables;
        var childScopes = scope.childScopes;
        var i, l;

        if (scope.type !== "TDZ" && (scope.type !== "global" || config.vars === "all")) {
            for (i = 0, l = variables.length; i < l; ++i) {
                var variable = variables[i];

                // skip a variable of class itself name in the class scope
                if (scope.type === "class" && scope.block.id === variable.identifiers[0]) {
                    continue;
                }

                // skip function expression names and variables marked with markVariableAsUsed()
                if (scope.functionExpressionScope || variable.eslintUsed) {
                    continue;
                }

                // skip implicit "arguments" variable
                if (scope.type === "function" && variable.name === "arguments" && variable.identifiers.length === 0) {
                    continue;
                }

                // explicit global variables don't have definitions.
                var def = variable.defs[0];

                if (def) {
                    var type = def.type;

                    // skip catch variables
                    if (type === "CatchClause") {
                        if (config.caughtErrors === "none") {
                            continue;
                        }

                        // skip ignored parameters
                        if (config.caughtErrorsIgnorePattern && config.caughtErrorsIgnorePattern.test(def.name.name)) {
                            continue;
                        }
                    }

                    if (type === "Parameter") {

                        // skip any setter argument
                        if (def.node.parent.type === "Property" && def.node.parent.kind === "set") {
                            continue;
                        }

                        // if "args" option is "none", skip any parameter
                        if (config.args === "none") {
                            continue;
                        }

                        // skip ignored parameters
                        if (config.argsIgnorePattern && config.argsIgnorePattern.test(def.name.name)) {
                            continue;
                        }

                        // if "args" option is "after-used", skip all but the last parameter
                        if (config.args === "after-used" && def.index < def.node.params.length - 1) {
                            continue;
                        }
                    } else {

                        // skip ignored variables
                        if (config.varsIgnorePattern && config.varsIgnorePattern.test(def.name.name)) {
                            continue;
                        }
                    }
                }

                if (!isUsedVariable(variable) && !isExported(variable)) {
                    unusedVars.push(variable);
                }
            }
        }

        for (i = 0, l = childScopes.length; i < l; ++i) {
            collectUnusedVariables(childScopes[i], unusedVars);
        }

        return unusedVars;
    }

    /**
     * Gets the index of a given variable name in a given comment.
     * @param {escope.Variable} variable - A variable to get.
     * @param {ASTNode} comment - A comment node which includes the variable name.
     * @returns {number} The index of the variable name's location.
     */
    function getColumnInComment(variable, comment) {
        var namePattern = new RegExp("[\\s,]" + lodash.escapeRegExp(variable.name) + "(?:$|[\\s,:])", "g");

        // To ignore the first text "global".
        namePattern.lastIndex = comment.value.indexOf("global") + 6;

        // Search a given variable name.
        var match = namePattern.exec(comment.value);

        return match ? match.index + 1 : 0;
    }

    /**
     * Creates the correct location of a given variables.
     * The location is at its name string in a `/*global` comment.
     *
     * @param {escope.Variable} variable - A variable to get its location.
     * @returns {{line: number, column: number}} The location object for the variable.
     */
    function getLocation(variable) {
        var comment = variable.eslintExplicitGlobalComment;
        var baseLoc = comment.loc.start;
        var column = getColumnInComment(variable, comment);
        var prefix = comment.value.slice(0, column);
        var lineInComment = (prefix.match(/\n/g) || []).length;

        if (lineInComment > 0) {
            column -= 1 + prefix.lastIndexOf("\n");
        } else {

            // 2 is for `/*`
            column += baseLoc.column + 2;
        }

        return {
            line: baseLoc.line + lineInComment,
            column: column
        };
    }

    //--------------------------------------------------------------------------
    // Public
    //--------------------------------------------------------------------------

    return {
        "Program:exit": function(programNode) {
            var unusedVars = collectUnusedVariables(context.getScope(), []);

            for (var i = 0, l = unusedVars.length; i < l; ++i) {
                var unusedVar = unusedVars[i];

                if (unusedVar.eslintExplicitGlobal) {
                    context.report({
                        node: programNode,
                        loc: getLocation(unusedVar),
                        message: MESSAGE,
                        data: unusedVar
                    });
                } else if (unusedVar.defs.length > 0) {
                    context.report({
                        node: unusedVar.identifiers[0],
                        message: MESSAGE,
                        data: unusedVar
                    });
                }
            }
        }
    };

}

};

},{“lodash”:108}],304:[function(require,module,exports){ /**

* @fileoverview Rule to flag use of variables before they are defined
* @author Ilya Volodin
*/

“use strict”;

//—————————————————————————— // Helpers //——————————————————————————

var SENTINEL_TYPE = /^(?:(?:Function|Class)(?:Declaration|Expression)|ArrowFunctionExpression|CatchClause|ImportDeclaration|ExportNamedDeclaration)$/;

/**

* Parses a given value as options.
*
* @param {any} options - A value to parse.
* @returns {object} The parsed options.
*/

function parseOptions(options) {

var functions = true;
var classes = true;

if (typeof options === "string") {
    functions = (options !== "nofunc");
} else if (typeof options === "object" && options !== null) {
    functions = options.functions !== false;
    classes = options.classes !== false;
}

return {functions: functions, classes: classes};

}

/**

* @returns {boolean} `false`.
*/

function alwaysFalse() {

return false;

}

/**

* Checks whether or not a given variable is a function declaration.
*
* @param {escope.Variable} variable - A variable to check.
* @returns {boolean} `true` if the variable is a function declaration.
*/

function isFunction(variable) {

return variable.defs[0].type === "FunctionName";

}

/**

* Checks whether or not a given variable is a class declaration in an upper function scope.
*
* @param {escope.Variable} variable - A variable to check.
* @param {escope.Reference} reference - A reference to check.
* @returns {boolean} `true` if the variable is a class declaration.
*/

function isOuterClass(variable, reference) {

return (
    variable.defs[0].type === "ClassName" &&
    variable.scope.variableScope !== reference.from.variableScope
);

}

/**

* Checks whether or not a given variable is a function declaration or a class declaration in an upper function scope.
*
* @param {escope.Variable} variable - A variable to check.
* @param {escope.Reference} reference - A reference to check.
* @returns {boolean} `true` if the variable is a function declaration or a class declaration.
*/

function isFunctionOrOuterClass(variable, reference) {

return isFunction(variable, reference) || isOuterClass(variable, reference);

}

/**

* Checks whether or not a given location is inside of the range of a given node.
*
* @param {ASTNode} node - An node to check.
* @param {number} location - A location to check.
* @returns {boolean} `true` if the location is inside of the range of the node.
*/

function isInRange(node, location) {

return node && node.range[0] <= location && location <= node.range[1];

}

/**

* Checks whether or not a given reference is inside of the initializers of a given variable.
*
* @param {Variable} variable - A variable to check.
* @param {Reference} reference - A reference to check.
* @returns {boolean} `true` if the reference is inside of the initializers.
*/

function isInInitializer(variable, reference) {

if (variable.scope !== reference.from) {
    return false;
}

var node = variable.identifiers[0].parent;
var location = reference.identifier.range[1];

while (node) {
    if (node.type === "VariableDeclarator") {
        if (isInRange(node.init, location)) {
            return true;
        }
        break;
    } else if (node.type === "AssignmentPattern") {
        if (isInRange(node.right, location)) {
            return true;
        }
    } else if (SENTINEL_TYPE.test(node.type)) {
        break;
    }

    node = node.parent;
}

return false;

}

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow the use of variables before they are defined",
        category: "Variables",
        recommended: false
    },

    schema: [
        {
            oneOf: [
                {
                    enum: ["nofunc"]
                },
                {
                    type: "object",
                    properties: {
                        functions: {type: "boolean"},
                        classes: {type: "boolean"}
                    },
                    additionalProperties: false
                }
            ]
        }
    ]
},

create: function(context) {
    var options = parseOptions(context.options[0]);

    // Defines a function which checks whether or not a reference is allowed according to the option.
    var isAllowed;

    if (options.functions && options.classes) {
        isAllowed = alwaysFalse;
    } else if (options.functions) {
        isAllowed = isOuterClass;
    } else if (options.classes) {
        isAllowed = isFunction;
    } else {
        isAllowed = isFunctionOrOuterClass;
    }

    /**
     * Finds and validates all variables in a given scope.
     * @param {Scope} scope The scope object.
     * @returns {void}
     * @private
     */
    function findVariablesInScope(scope) {
        scope.references.forEach(function(reference) {
            var variable = reference.resolved;

            // Skips when the reference is:
            // - initialization's.
            // - referring to an undefined variable.
            // - referring to a global environment variable (there're no identifiers).
            // - located preceded by the variable (except in initializers).
            // - allowed by options.
            if (reference.init ||
                !variable ||
                variable.identifiers.length === 0 ||
                (variable.identifiers[0].range[1] < reference.identifier.range[1] && !isInInitializer(variable, reference)) ||
                isAllowed(variable, reference)
            ) {
                return;
            }

            // Reports.
            context.report({
                node: reference.identifier,
                message: "'{{name}}' was used before it was defined",
                data: reference.identifier
            });
        });
    }

    /**
     * Validates variables inside of a node's scope.
     * @param {ASTNode} node The node to check.
     * @returns {void}
     * @private
     */
    function findVariables() {
        var scope = context.getScope();

        findVariablesInScope(scope);
    }

    var ruleDefinition = {
        "Program:exit": function(node) {
            var scope = context.getScope(),
                ecmaFeatures = context.parserOptions.ecmaFeatures || {};

            findVariablesInScope(scope);

            // both Node.js and Modules have an extra scope
            if (ecmaFeatures.globalReturn || node.sourceType === "module") {
                findVariablesInScope(scope.childScopes[0]);
            }
        }
    };

    if (context.parserOptions.ecmaVersion >= 6) {
        ruleDefinition["BlockStatement:exit"] =
            ruleDefinition["SwitchStatement:exit"] = findVariables;

        ruleDefinition["ArrowFunctionExpression:exit"] = function(node) {
            if (node.body.type !== "BlockStatement") {
                findVariables(node);
            }
        };
    } else {
        ruleDefinition["FunctionExpression:exit"] =
            ruleDefinition["FunctionDeclaration:exit"] =
            ruleDefinition["ArrowFunctionExpression:exit"] = findVariables;
    }

    return ruleDefinition;
}

};

},{}],305:[function(require,module,exports){ /**

* @fileoverview A rule to disallow unnecessary `.call()` and `.apply()`.
* @author Toru Nagashima
*/

“use strict”;

var astUtils = require(“../ast-utils”);

//—————————————————————————— // Helpers //——————————————————————————

/**

* Checks whether or not a node is a `.call()`/`.apply()`.
* @param {ASTNode} node - A CallExpression node to check.
* @returns {boolean} Whether or not the node is a `.call()`/`.apply()`.
*/

function isCallOrNonVariadicApply(node) {

return (
    node.callee.type === "MemberExpression" &&
    node.callee.property.type === "Identifier" &&
    node.callee.computed === false &&
    (
        (node.callee.property.name === "call" && node.arguments.length >= 1) ||
        (node.callee.property.name === "apply" && node.arguments.length === 2 && node.arguments[1].type === "ArrayExpression")
    )
);

}

/**

* Checks whether or not the tokens of two given nodes are same.
* @param {ASTNode} left - A node 1 to compare.
* @param {ASTNode} right - A node 2 to compare.
* @param {SourceCode} sourceCode - The ESLint source code object.
* @returns {boolean} the source code for the given node.
*/

function equalTokens(left, right, sourceCode) {

var tokensL = sourceCode.getTokens(left);
var tokensR = sourceCode.getTokens(right);

if (tokensL.length !== tokensR.length) {
    return false;
}
for (var i = 0; i < tokensL.length; ++i) {
    if (tokensL[i].type !== tokensR[i].type ||
        tokensL[i].value !== tokensR[i].value
    ) {
        return false;
    }
}

return true;

}

/**

* Checks whether or not `thisArg` is not changed by `.call()`/`.apply()`.
* @param {ASTNode|null} expectedThis - The node that is the owner of the applied function.
* @param {ASTNode} thisArg - The node that is given to the first argument of the `.call()`/`.apply()`.
* @param {SourceCode} sourceCode - The ESLint source code object.
* @returns {boolean} Whether or not `thisArg` is not changed by `.call()`/`.apply()`.
*/

function isValidThisArg(expectedThis, thisArg, sourceCode) {

if (!expectedThis) {
    return astUtils.isNullOrUndefined(thisArg);
}
return equalTokens(expectedThis, thisArg, sourceCode);

}

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow unnecessary calls to `.call()` and `.apply()`",
        category: "Best Practices",
        recommended: false
    },

    schema: []
},

create: function(context) {
    var sourceCode = context.getSourceCode();

    return {
        CallExpression: function(node) {
            if (!isCallOrNonVariadicApply(node)) {
                return;
            }

            var applied = node.callee.object;
            var expectedThis = (applied.type === "MemberExpression") ? applied.object : null;
            var thisArg = node.arguments[0];

            if (isValidThisArg(expectedThis, thisArg, sourceCode)) {
                context.report(
                    node,
                    "unnecessary '.{{name}}()'.",
                    {name: node.callee.property.name});
            }
        }
    };
}

};

},{“../ast-utils”:124}],306:[function(require,module,exports){ /**

* @fileoverview Rule to disallow unnecessary computed property keys in object literals
* @author Burak Yigit Kaya
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

var MESSAGE_UNNECESSARY_COMPUTED = “Unnecessarily computed property [{{property}}] found.”;

module.exports = {

meta: {
    docs: {
        description: "disallow unnecessary computed property keys in object literals",
        category: "ECMAScript 6",
        recommended: false
    }
},
create: function(context) {
    var sourceCode = context.getSourceCode();

    return {
        Property: function(node) {
            if (!node.computed) {
                return;
            }

            var key = node.key,
                nodeType = typeof key.value;

            if (key.type === "Literal" && (nodeType === "string" || nodeType === "number")) {
                context.report(node, MESSAGE_UNNECESSARY_COMPUTED, { property: sourceCode.getText(key) });
            }
        }
    };
}

};

},{}],307:[function(require,module,exports){ /**

* @fileoverview disallow unncessary concatenation of template strings
* @author Henry Zhu
*/

“use strict”;

//—————————————————————————— // Requirements //——————————————————————————

var astUtils = require(“../ast-utils”);

//—————————————————————————— // Helpers //——————————————————————————

/**

* Checks whether or not a given node is a concatenation.
* @param {ASTNode} node - A node to check.
* @returns {boolean} `true` if the node is a concatenation.
*/

function isConcatenation(node) {

return node.type === "BinaryExpression" && node.operator === "+";

}

/**

* Get's the right most node on the left side of a BinaryExpression with + operator.
* @param {ASTNode} node - A BinaryExpression node to check.
* @returns {ASTNode} node
*/

function getLeft(node) {

var left = node.left;

while (isConcatenation(left)) {
    left = left.right;
}
return left;

}

/**

* Get's the left most node on the right side of a BinaryExpression with + operator.
* @param {ASTNode} node - A BinaryExpression node to check.
* @returns {ASTNode} node
*/

function getRight(node) {

var right = node.right;

while (isConcatenation(right)) {
    right = right.left;
}
return right;

}

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow unnecessary concatenation of literals or template literals",
        category: "Best Practices",
        recommended: false
    },

    schema: []
},

create: function(context) {
    var sourceCode = context.getSourceCode();

    return {
        BinaryExpression: function(node) {

            // check if not concatenation
            if (node.operator !== "+") {
                return;
            }

            // account for the `foo + "a" + "b"` case
            var left = getLeft(node);
            var right = getRight(node);

            if (astUtils.isStringLiteral(left) &&
                astUtils.isStringLiteral(right) &&
                astUtils.isTokenOnSameLine(left, right)
            ) {

                // move warning location to operator
                var operatorToken = sourceCode.getTokenAfter(left);

                while (operatorToken.value !== "+") {
                    operatorToken = sourceCode.getTokenAfter(operatorToken);
                }

                context.report(
                    node,
                    operatorToken.loc.start,
                    "Unexpected string concatenation of literals.");
            }
        }
    };
}

};

},{“../ast-utils”:124}],308:[function(require,module,exports){ /**

* @fileoverview Rule to flag the use of redundant constructors in classes.
* @author Alberto Rodríguez
*/

“use strict”;

//—————————————————————————— // Helpers //——————————————————————————

/**

* Checks whether a given array of statements is a single call of `super`.
*
* @param {ASTNode[]} body - An array of statements to check.
* @returns {boolean} `true` if the body is a single call of `super`.
*/

function isSingleSuperCall(body) {

return (
    body.length === 1 &&
    body[0].type === "ExpressionStatement" &&
    body[0].expression.type === "CallExpression" &&
    body[0].expression.callee.type === "Super"
);

}

/**

* Checks whether a given node is a pattern which doesn't have any side effects.
* Default parameters and Destructuring parameters can have side effects.
*
* @param {ASTNode} node - A pattern node.
* @returns {boolean} `true` if the node doesn't have any side effects.
*/

function isSimple(node) {

return node.type === "Identifier" || node.type === "RestElement";

}

/**

* Checks whether a given array of expressions is `...arguments` or not.
* `super(...arguments)` passes all arguments through.
*
* @param {ASTNode[]} superArgs - An array of expressions to check.
* @returns {boolean} `true` if the superArgs is `...arguments`.
*/

function isSpreadArguments(superArgs) {

return (
    superArgs.length === 1 &&
    superArgs[0].type === "SpreadElement" &&
    superArgs[0].argument.type === "Identifier" &&
    superArgs[0].argument.name === "arguments"
);

}

/**

* Checks whether given 2 nodes are identifiers which have the same name or not.
*
* @param {ASTNode} ctorParam - A node to check.
* @param {ASTNode} superArg - A node to check.
* @returns {boolean} `true` if the nodes are identifiers which have the same
*      name.
*/

function isValidIdentifierPair(ctorParam, superArg) {

return (
    ctorParam.type === "Identifier" &&
    superArg.type === "Identifier" &&
    ctorParam.name === superArg.name
);

}

/**

* Checks whether given 2 nodes are a rest/spread pair which has the same values.
*
* @param {ASTNode} ctorParam - A node to check.
* @param {ASTNode} superArg - A node to check.
* @returns {boolean} `true` if the nodes are a rest/spread pair which has the
*      same values.
*/

function isValidRestSpreadPair(ctorParam, superArg) {

return (
    ctorParam.type === "RestElement" &&
    superArg.type === "SpreadElement" &&
    isValidIdentifierPair(ctorParam.argument, superArg.argument)
);

}

/**

* Checks whether given 2 nodes have the same value or not.
*
* @param {ASTNode} ctorParam - A node to check.
* @param {ASTNode} superArg - A node to check.
* @returns {boolean} `true` if the nodes have the same value or not.
*/

function isValidPair(ctorParam, superArg) {

return (
    isValidIdentifierPair(ctorParam, superArg) ||
    isValidRestSpreadPair(ctorParam, superArg)
);

}

/**

* Checks whether the parameters of a constructor and the arguments of `super()`
* have the same values or not.
*
* @param {ASTNode} ctorParams - The parameters of a constructor to check.
* @param {ASTNode} superArgs - The arguments of `super()` to check.
* @returns {boolean} `true` if those have the same values.
*/

function isPassingThrough(ctorParams, superArgs) {

if (ctorParams.length !== superArgs.length) {
    return false;
}

for (var i = 0; i < ctorParams.length; ++i) {
    if (!isValidPair(ctorParams[i], superArgs[i])) {
        return false;
    }
}

return true;

}

/**

* Checks whether the constructor body is a redundant super call.
*
* @param {Array} body - constructor body content.
* @param {Array} ctorParams - The params to check against super call.
* @returns {boolean} true if the construtor body is redundant
*/

function isRedundantSuperCall(body, ctorParams) {

return (
    isSingleSuperCall(body) &&
    ctorParams.every(isSimple) &&
    (
        isSpreadArguments(body[0].expression.arguments) ||
        isPassingThrough(ctorParams, body[0].expression.arguments)
    )
);

}

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow unnecessary constructors",
        category: "ECMAScript 6",
        recommended: false
    },

    schema: []
},

create: function(context) {

    /**
     * Checks whether a node is a redundant constructor
     * @param {ASTNode} node - node to check
     * @returns {void}
     */
    function checkForConstructor(node) {
        if (node.kind !== "constructor") {
            return;
        }

        var body = node.value.body.body;
        var ctorParams = node.value.params;
        var superClass = node.parent.parent.superClass;

        if (superClass ? isRedundantSuperCall(body, ctorParams) : (body.length === 0)) {
            context.report({
                node: node,
                message: "Useless constructor."
            });
        }
    }

    return {
        MethodDefinition: checkForConstructor
    };
}

};

},{}],309:[function(require,module,exports){ /**

* @fileoverview Look for useless escapes in strings and regexes
* @author Onur Temizkan
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

var VALID_STRING_ESCAPES = [

"\\",
"n",
"r",
"v",
"t",
"b",
"f",
"u",
"x",
"\n",
"\r"

];

var VALID_REGEX_ESCAPES = [

"\\",
".",
"-",
"^",
"$",
"*",
"+",
"?",
"{",
"}",
"[",
"]",
"|",
"(",
")",
"b",
"B",
"c",
"d",
"D",
"f",
"n",
"r",
"s",
"S",
"t",
"v",
"w",
"W",
"x",
"u"

];

module.exports = {

meta: {
    docs: {
        description: "disallow unnecessary escape characters",
        category: "Best Practices",
        recommended: false
    },

    schema: []
},

create: function(context) {

    /**
     * Checks if the escape character in given slice is unnecessary.
     *
     * @private
     * @param {string[]} escapes - list of valid escapes
     * @param {ASTNode} node - node to validate.
     * @param {string} elm - string slice to validate.
     * @returns {void}
     */
    function validate(escapes, node, elm) {
        var escapeNotFound = escapes.indexOf(elm[0][1]) === -1;
        var isQuoteEscape = elm[0][1] === node.raw[0];

        if (escapeNotFound && !isQuoteEscape) {
            context.report({
                node: node,
                loc: {
                    line: node.loc.start.line,
                    column: node.loc.start.column + elm.index
                },
                message: "Unnecessary escape character: " + elm[0]
            });
        }
    }

    /**
     * Checks if a node has an escape.
     *
     * @param {ASTNode} node - node to check.
     * @returns {void}
     */
    function check(node) {
        var nodeEscapes, match;
        var pattern = /\\[^\d]/g;

        if (typeof node.value === "string") {

            // JSXAttribute doesn't have any escape sequence: https://facebook.github.io/jsx/
            if (node.parent.type === "JSXAttribute") {
                return;
            }

            nodeEscapes = VALID_STRING_ESCAPES;
        } else if (node.regex) {
            nodeEscapes = VALID_REGEX_ESCAPES;
        } else {
            return;
        }

        while ((match = pattern.exec(node.raw))) {
            validate(nodeEscapes, node, match);
        }
    }
    return {
        Literal: check
    };
}

};

},{}],310:[function(require,module,exports){ /**

* @fileoverview Disallow renaming import, export, and destructured assignments to the same name.
* @author Kai Cataldo
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow renaming import, export, and destructured assignments to the same name",
        category: "ECMAScript 6",
        recommended: false
    },
    fixable: "code",
    schema: [
        {
            type: "object",
            properties: {
                ignoreDestructuring: { type: "boolean" },
                ignoreImport: { type: "boolean" },
                ignoreExport: { type: "boolean" }
            },
            additionalProperties: false
        }
    ]
},

create: function(context) {
    var options = context.options[0] || {},
        ignoreDestructuring = options.ignoreDestructuring === true,
        ignoreImport = options.ignoreImport === true,
        ignoreExport = options.ignoreExport === true;

    //--------------------------------------------------------------------------
    // Helpers
    //--------------------------------------------------------------------------

    /**
     * Reports error for unnecessarily renamed assignments
     * @param {ASTNode} node - node to report
     * @param {ASTNode} initial - node with initial name value
     * @param {ASTNode} result - node with new name value
     * @param {string} type - the type of the offending node
     * @returns {void}
     */
    function reportError(node, initial, result, type) {
        var name = initial.type === "Identifier" ? initial.name : initial.value;

        return context.report({
            node: node,
            message: "{{type}} {{name}} unnecessarily renamed.",
            data: {
                name: name,
                type: type
            },
            fix: function(fixer) {
                return fixer.replaceTextRange([
                    initial.range[0],
                    result.range[1]
                ], name);
            }
        });
    }

    /**
     * Checks whether a destructured assignment is unnecessarily renamed
     * @param {ASTNode} node - node to check
     * @returns {void}
     */
    function checkDestructured(node) {
        var properties,
            i;

        if (ignoreDestructuring) {
            return;
        }

        properties = node.properties;

        for (i = 0; i < properties.length; i++) {
            if (properties[i].shorthand) {
                return;
            }

            /**
             * If an ObjectPattern property is computed, we have no idea
             * if a rename is useless or not. If an ObjectPattern property
             * lacks a key, it is likely an ExperimentalRestProperty and
             * so there is no "renaming" occurring here.
             */
            if (properties[i].computed || !properties[i].key) {
                return;
            }

            if (properties[i].key.type === "Identifier" && properties[i].key.name === properties[i].value.name ||
                    properties[i].key.type === "Literal" && properties[i].key.value === properties[i].value.name) {
                reportError(properties[i], properties[i].key, properties[i].value, "Destructuring assignment");
            }
        }
    }

    /**
     * Checks whether an import is unnecessarily renamed
     * @param {ASTNode} node - node to check
     * @returns {void}
     */
    function checkImport(node) {
        if (ignoreImport) {
            return;
        }

        if (node.imported.name === node.local.name &&
                node.imported.range[0] !== node.local.range[0]) {
            reportError(node, node.imported, node.local, "Import");
        }
    }

    /**
     * Checks whether an export is unnecessarily renamed
     * @param {ASTNode} node - node to check
     * @returns {void}
     */
    function checkExport(node) {
        if (ignoreExport) {
            return;
        }

        if (node.local.name === node.exported.name &&
                node.local.range[0] !== node.exported.range[0]) {
            reportError(node, node.local, node.exported, "Export");
        }

    }

    //--------------------------------------------------------------------------
    // Public
    //--------------------------------------------------------------------------

    return {
        ObjectPattern: checkDestructured,
        ImportSpecifier: checkImport,
        ExportSpecifier: checkExport
    };
}

};

},{}],311:[function(require,module,exports){ /**

* @fileoverview Rule to check for the usage of var.
* @author Jamund Ferguson
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "require `let` or `const` instead of `var`",
        category: "ECMAScript 6",
        recommended: false
    },

    schema: []
},

create: function(context) {

    return {
        VariableDeclaration: function(node) {
            if (node.kind === "var") {
                context.report(node, "Unexpected var, use let or const instead.");
            }
        }

    };

}

};

},{}],312:[function(require,module,exports){ /**

* @fileoverview Rule to disallow use of void operator.
* @author Mike Sidorov
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow `void` operators",
        category: "Best Practices",
        recommended: false
    },

    schema: []
},

create: function(context) {

    //--------------------------------------------------------------------------
    // Public
    //--------------------------------------------------------------------------

    return {
        UnaryExpression: function(node) {
            if (node.operator === "void") {
                context.report(node, "Expected 'undefined' and instead saw 'void'.");
            }
        }
    };

}

};

},{}],313:[function(require,module,exports){ /**

* @fileoverview Rule that warns about used warning comments
* @author Alexander Schmidt <https://github.com/lxanders>
*/

“use strict”;

var astUtils = require(“../ast-utils”);

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow specified warning terms in comments",
        category: "Best Practices",
        recommended: false
    },

    schema: [
        {
            type: "object",
            properties: {
                terms: {
                    type: "array",
                    items: {
                        type: "string"
                    }
                },
                location: {
                    enum: ["start", "anywhere"]
                }
            },
            additionalProperties: false
        }
    ]
},

create: function(context) {

    var configuration = context.options[0] || {},
        warningTerms = configuration.terms || ["todo", "fixme", "xxx"],
        location = configuration.location || "start",
        selfConfigRegEx = /\bno-warning-comments\b/,
        warningRegExps;

    /**
     * Convert a warning term into a RegExp which will match a comment containing that whole word in the specified
     * location ("start" or "anywhere"). If the term starts or ends with non word characters, then the match will not
     * require word boundaries on that side.
     *
     * @param {String} term A term to convert to a RegExp
     * @returns {RegExp} The term converted to a RegExp
     */
    function convertToRegExp(term) {
        var escaped = term.replace(/[-\/\\$\^*+?.()|\[\]{}]/g, "\\$&"),
            suffix,
            prefix;

        /*
         * If the term ends in a word character (a-z0-9_), ensure a word
         * boundary at the end, so that substrings do not get falsely
         * matched. eg "todo" in a string such as "mastodon".
         * If the term ends in a non-word character, then \b won't match on
         * the boundary to the next non-word character, which would likely
         * be a space. For example `/\bFIX!\b/.test('FIX! blah') === false`.
         * In these cases, use no bounding match. Same applies for the
         * prefix, handled below.
         */
        suffix = /\w$/.test(term) ? "\\b" : "";

        if (location === "start") {

            /*
             * When matching at the start, ignore leading whitespace, and
             * there's no need to worry about word boundaries.
             */
            prefix = "^\\s*";
        } else if (/^\w/.test(term)) {
            prefix = "\\b";
        } else {
            prefix = "";
        }

        return new RegExp(prefix + escaped + suffix, "i");
    }

    /**
     * Checks the specified comment for matches of the configured warning terms and returns the matches.
     * @param {String} comment The comment which is checked.
     * @returns {Array} All matched warning terms for this comment.
     */
    function commentContainsWarningTerm(comment) {
        var matches = [];

        warningRegExps.forEach(function(regex, index) {
            if (regex.test(comment)) {
                matches.push(warningTerms[index]);
            }
        });

        return matches;
    }

    /**
     * Checks the specified node for matching warning comments and reports them.
     * @param {ASTNode} node The AST node being checked.
     * @returns {void} undefined.
     */
    function checkComment(node) {
        if (astUtils.isDirectiveComment(node) && selfConfigRegEx.test(node.value)) {
            return;
        }

        var matches = commentContainsWarningTerm(node.value);

        matches.forEach(function(matchedTerm) {
            context.report(node, "Unexpected '" + matchedTerm + "' comment.");
        });
    }

    warningRegExps = warningTerms.map(convertToRegExp);
    return {
        BlockComment: checkComment,
        LineComment: checkComment
    };
}

};

},{“../ast-utils”:124}],314:[function(require,module,exports){ /**

* @fileoverview Rule to disallow whitespace before properties
* @author Kai Cataldo
*/

“use strict”;

var astUtils = require(“../ast-utils”);

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow whitespace before properties",
        category: "Stylistic Issues",
        recommended: false
    },

    fixable: "whitespace",
    schema: []
},

create: function(context) {
    var sourceCode = context.getSourceCode();

    //--------------------------------------------------------------------------
    // Helpers
    //--------------------------------------------------------------------------

    /**
     * Finds opening bracket token of node's computed property
     * @param {ASTNode} node - the node to check
     * @returns {Token} opening bracket token of node's computed property
     * @private
     */
    function findOpeningBracket(node) {
        var token = sourceCode.getTokenBefore(node.property);

        while (token.value !== "[") {
            token = sourceCode.getTokenBefore(token);
        }
        return token;
    }

    /**
     * Reports whitespace before property token
     * @param {ASTNode} node - the node to report in the event of an error
     * @param {Token} leftToken - the left token
     * @param {Token} rightToken - the right token
     * @returns {void}
     * @private
     */
    function reportError(node, leftToken, rightToken) {
        var replacementText = node.computed ? "" : ".";

        context.report({
            node: node,
            message: "Unexpected whitespace before property {{propName}}.",
            data: {
                propName: sourceCode.getText(node.property)
            },
            fix: function(fixer) {
                return fixer.replaceTextRange([leftToken.range[1], rightToken.range[0]], replacementText);
            }
        });
    }

    //--------------------------------------------------------------------------
    // Public
    //--------------------------------------------------------------------------

    return {
        MemberExpression: function(node) {
            var rightToken;
            var leftToken;

            if (!astUtils.isTokenOnSameLine(node.object, node.property)) {
                return;
            }

            if (node.computed) {
                rightToken = findOpeningBracket(node);
                leftToken = sourceCode.getTokenBefore(rightToken);
            } else {
                rightToken = sourceCode.getFirstToken(node.property);
                leftToken = sourceCode.getTokenBefore(rightToken, 1);
            }

            if (sourceCode.isSpaceBetweenTokens(leftToken, rightToken)) {
                reportError(node, leftToken, rightToken);
            }
        }
    };
}

};

},{“../ast-utils”:124}],315:[function(require,module,exports){ /**

* @fileoverview Rule to flag use of with statement
* @author Nicholas C. Zakas
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "disallow `with` statements",
        category: "Best Practices",
        recommended: false
    },

    schema: []
},

create: function(context) {

    return {
        WithStatement: function(node) {
            context.report(node, "Unexpected use of 'with' statement.");
        }
    };

}

};

},{}],316:[function(require,module,exports){ /**

* @fileoverview Rule to require or disallow line breaks inside braces.
* @author Toru Nagashima
*/

“use strict”;

//—————————————————————————— // Requirements //——————————————————————————

var astUtils = require(“../ast-utils”);

//—————————————————————————— // Helpers //——————————————————————————

// Schema objects. var OPTION_VALUE = {

oneOf: [
    {
        enum: ["always", "never"]
    },
    {
        type: "object",
        properties: {
            multiline: {
                type: "boolean"
            },
            minProperties: {
                type: "integer",
                minimum: 0
            }
        },
        additionalProperties: false,
        minProperties: 1
    }
]

};

/**

* Normalizes a given option value.
*
* @param {string|object|undefined} value - An option value to parse.
* @returns {{multiline: boolean, minProperties: number}} Normalized option object.
*/

function normalizeOptionValue(value) {

var multiline = false;
var minProperties = Number.POSITIVE_INFINITY;

if (value) {
    if (value === "always") {
        minProperties = 0;
    } else if (value === "never") {
        minProperties = Number.POSITIVE_INFINITY;
    } else {
        multiline = Boolean(value.multiline);
        minProperties = value.minProperties || Number.POSITIVE_INFINITY;
    }
} else {
    multiline = true;
}

return {multiline: multiline, minProperties: minProperties};

}

/**

* Normalizes a given option value.
*
* @param {string|object|undefined} options - An option value to parse.
* @returns {{ObjectExpression: {multiline: boolean, minProperties: number}, ObjectPattern: {multiline: boolean, minProperties: number}}} Normalized option object.
*/

function normalizeOptions(options) {

if (options && (options.ObjectExpression || options.ObjectPattern)) {
    return {
        ObjectExpression: normalizeOptionValue(options.ObjectExpression),
        ObjectPattern: normalizeOptionValue(options.ObjectPattern)
    };
}

var value = normalizeOptionValue(options);

return {ObjectExpression: value, ObjectPattern: value};

}

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "require or disallow line breaks inside braces.",
        category: "Stylistic Issues",
        recommended: false
    },
    fixable: "whitespace",
    schema: [
        {
            oneOf: [
                OPTION_VALUE,
                {
                    type: "object",
                    properties: {
                        ObjectExpression: OPTION_VALUE,
                        ObjectPattern: OPTION_VALUE
                    },
                    additionalProperties: false,
                    minProperties: 1
                }
            ]
        }
    ]
},

create: function(context) {
    var sourceCode = context.getSourceCode();
    var normalizedOptions = normalizeOptions(context.options[0]);

    /**
     * Reports a given node if it violated this rule.
     *
     * @param {ASTNode} node - A node to check. This is an ObjectExpression node or an ObjectPattern node.
     * @param {{multiline: boolean, minProperties: number}} options - An option object.
     * @returns {void}
     */
    function check(node) {
        var options = normalizedOptions[node.type];
        var openBrace = sourceCode.getFirstToken(node);
        var closeBrace = sourceCode.getLastToken(node);
        var first = sourceCode.getTokenOrCommentAfter(openBrace);
        var last = sourceCode.getTokenOrCommentBefore(closeBrace);
        var needsLinebreaks = (
            node.properties.length >= options.minProperties ||
            (
                options.multiline &&
                node.properties.length > 0 &&
                first.loc.start.line !== last.loc.end.line
            )
        );

        /*
         * Use tokens or comments to check multiline or not.
         * But use only tokens to check whether line breaks are needed.
         * This allows:
         *     var obj = { // eslint-disable-line foo
         *         a: 1
         *     }
         */
        first = sourceCode.getTokenAfter(openBrace);
        last = sourceCode.getTokenBefore(closeBrace);

        if (needsLinebreaks) {
            if (astUtils.isTokenOnSameLine(openBrace, first)) {
                context.report({
                    message: "Expected a line break after this open brace.",
                    node: node,
                    loc: openBrace.loc.start,
                    fix: function(fixer) {
                        return fixer.insertTextAfter(openBrace, "\n");
                    }
                });
            }
            if (astUtils.isTokenOnSameLine(last, closeBrace)) {
                context.report({
                    message: "Expected a line break before this close brace.",
                    node: node,
                    loc: closeBrace.loc.start,
                    fix: function(fixer) {
                        return fixer.insertTextBefore(closeBrace, "\n");
                    }
                });
            }
        } else {
            if (!astUtils.isTokenOnSameLine(openBrace, first)) {
                context.report({
                    message: "Unexpected a line break after this open brace.",
                    node: node,
                    loc: openBrace.loc.start,
                    fix: function(fixer) {
                        return fixer.removeRange([
                            openBrace.range[1],
                            first.range[0]
                        ]);
                    }
                });
            }
            if (!astUtils.isTokenOnSameLine(last, closeBrace)) {
                context.report({
                    message: "Unexpected a line break before this close brace.",
                    node: node,
                    loc: closeBrace.loc.start,
                    fix: function(fixer) {
                        return fixer.removeRange([
                            last.range[1],
                            closeBrace.range[0]
                        ]);
                    }
                });
            }
        }
    }

    return {
        ObjectExpression: check,
        ObjectPattern: check
    };
}

};

},{“../ast-utils”:124}],317:[function(require,module,exports){ /**

* @fileoverview Disallows or enforces spaces inside of object literals.
* @author Jamund Ferguson
*/

“use strict”;

var astUtils = require(“../ast-utils”);

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "enforce consistent spacing inside braces",
        category: "Stylistic Issues",
        recommended: false
    },

    fixable: "whitespace",

    schema: [
        {
            enum: ["always", "never"]
        },
        {
            type: "object",
            properties: {
                arraysInObjects: {
                    type: "boolean"
                },
                objectsInObjects: {
                    type: "boolean"
                }
            },
            additionalProperties: false
        }
    ]
},

create: function(context) {
    var spaced = context.options[0] === "always",
        sourceCode = context.getSourceCode();

    /**
     * Determines whether an option is set, relative to the spacing option.
     * If spaced is "always", then check whether option is set to false.
     * If spaced is "never", then check whether option is set to true.
     * @param {Object} option - The option to exclude.
     * @returns {boolean} Whether or not the property is excluded.
     */
    function isOptionSet(option) {
        return context.options[1] ? context.options[1][option] === !spaced : false;
    }

    var options = {
        spaced: spaced,
        arraysInObjectsException: isOptionSet("arraysInObjects"),
        objectsInObjectsException: isOptionSet("objectsInObjects")
    };

    //--------------------------------------------------------------------------
    // Helpers
    //--------------------------------------------------------------------------

    /**
    * Reports that there shouldn't be a space after the first token
    * @param {ASTNode} node - The node to report in the event of an error.
    * @param {Token} token - The token to use for the report.
    * @returns {void}
    */
    function reportNoBeginningSpace(node, token) {
        context.report({
            node: node,
            loc: token.loc.start,
            message: "There should be no space after '" + token.value + "'",
            fix: function(fixer) {
                var nextToken = context.getSourceCode().getTokenAfter(token);

                return fixer.removeRange([token.range[1], nextToken.range[0]]);
            }
        });
    }

    /**
    * Reports that there shouldn't be a space before the last token
    * @param {ASTNode} node - The node to report in the event of an error.
    * @param {Token} token - The token to use for the report.
    * @returns {void}
    */
    function reportNoEndingSpace(node, token) {
        context.report({
            node: node,
            loc: token.loc.start,
            message: "There should be no space before '" + token.value + "'",
            fix: function(fixer) {
                var previousToken = context.getSourceCode().getTokenBefore(token);

                return fixer.removeRange([previousToken.range[1], token.range[0]]);
            }
        });
    }

    /**
    * Reports that there should be a space after the first token
    * @param {ASTNode} node - The node to report in the event of an error.
    * @param {Token} token - The token to use for the report.
    * @returns {void}
    */
    function reportRequiredBeginningSpace(node, token) {
        context.report({
            node: node,
            loc: token.loc.start,
            message: "A space is required after '" + token.value + "'",
            fix: function(fixer) {
                return fixer.insertTextAfter(token, " ");
            }
        });
    }

    /**
    * Reports that there should be a space before the last token
    * @param {ASTNode} node - The node to report in the event of an error.
    * @param {Token} token - The token to use for the report.
    * @returns {void}
    */
    function reportRequiredEndingSpace(node, token) {
        context.report({
            node: node,
            loc: token.loc.start,
            message: "A space is required before '" + token.value + "'",
            fix: function(fixer) {
                return fixer.insertTextBefore(token, " ");
            }
        });
    }

    /**
     * Determines if spacing in curly braces is valid.
     * @param {ASTNode} node The AST node to check.
     * @param {Token} first The first token to check (should be the opening brace)
     * @param {Token} second The second token to check (should be first after the opening brace)
     * @param {Token} penultimate The penultimate token to check (should be last before closing brace)
     * @param {Token} last The last token to check (should be closing brace)
     * @returns {void}
     */
    function validateBraceSpacing(node, first, second, penultimate, last) {
        var shouldCheckPenultimate,
            penultimateType,
            closingCurlyBraceMustBeSpaced,
            firstSpaced,
            lastSpaced;

        if (astUtils.isTokenOnSameLine(first, second)) {
            firstSpaced = sourceCode.isSpaceBetweenTokens(first, second);
            if (options.spaced && !firstSpaced) {
                reportRequiredBeginningSpace(node, first);
            }
            if (!options.spaced && firstSpaced) {
                reportNoBeginningSpace(node, first);
            }
        }

        if (astUtils.isTokenOnSameLine(penultimate, last)) {
            shouldCheckPenultimate = (
                options.arraysInObjectsException && penultimate.value === "]" ||
                options.objectsInObjectsException && penultimate.value === "}"
            );
            penultimateType = shouldCheckPenultimate && sourceCode.getNodeByRangeIndex(penultimate.start).type;

            closingCurlyBraceMustBeSpaced = (
                options.arraysInObjectsException && penultimateType === "ArrayExpression" ||
                options.objectsInObjectsException && penultimateType === "ObjectExpression"
            ) ? !options.spaced : options.spaced;

            lastSpaced = sourceCode.isSpaceBetweenTokens(penultimate, last);

            if (closingCurlyBraceMustBeSpaced && !lastSpaced) {
                reportRequiredEndingSpace(node, last);
            }
            if (!closingCurlyBraceMustBeSpaced && lastSpaced) {
                reportNoEndingSpace(node, last);
            }
        }
    }

    /**
     * Reports a given object node if spacing in curly braces is invalid.
     * @param {ASTNode} node - An ObjectExpression or ObjectPattern node to check.
     * @returns {void}
     */
    function checkForObject(node) {
        if (node.properties.length === 0) {
            return;
        }

        var first = sourceCode.getFirstToken(node),
            last = sourceCode.getLastToken(node),
            second = sourceCode.getTokenAfter(first),
            penultimate = sourceCode.getTokenBefore(last);

        validateBraceSpacing(node, first, second, penultimate, last);
    }

    /**
     * Reports a given import node if spacing in curly braces is invalid.
     * @param {ASTNode} node - An ImportDeclaration node to check.
     * @returns {void}
     */
    function checkForImport(node) {
        if (node.specifiers.length === 0) {
            return;
        }

        var firstSpecifier = node.specifiers[0],
            lastSpecifier = node.specifiers[node.specifiers.length - 1];

        if (lastSpecifier.type !== "ImportSpecifier") {
            return;
        }
        if (firstSpecifier.type !== "ImportSpecifier") {
            firstSpecifier = node.specifiers[1];
        }

        var first = sourceCode.getTokenBefore(firstSpecifier),
            last = sourceCode.getTokenAfter(lastSpecifier);

        // to support a trailing comma.
        if (last.value === ",") {
            last = sourceCode.getTokenAfter(last);
        }

        var second = sourceCode.getTokenAfter(first),
            penultimate = sourceCode.getTokenBefore(last);

        validateBraceSpacing(node, first, second, penultimate, last);
    }

    /**
     * Reports a given export node if spacing in curly braces is invalid.
     * @param {ASTNode} node - An ExportNamedDeclaration node to check.
     * @returns {void}
     */
    function checkForExport(node) {
        if (node.specifiers.length === 0) {
            return;
        }

        var firstSpecifier = node.specifiers[0],
            lastSpecifier = node.specifiers[node.specifiers.length - 1],
            first = sourceCode.getTokenBefore(firstSpecifier),
            last = sourceCode.getTokenAfter(lastSpecifier);

        // to support a trailing comma.
        if (last.value === ",") {
            last = sourceCode.getTokenAfter(last);
        }

        var second = sourceCode.getTokenAfter(first),
            penultimate = sourceCode.getTokenBefore(last);

        validateBraceSpacing(node, first, second, penultimate, last);
    }

    //--------------------------------------------------------------------------
    // Public
    //--------------------------------------------------------------------------

    return {

        // var {x} = y;
        ObjectPattern: checkForObject,

        // var y = {x: 'y'}
        ObjectExpression: checkForObject,

        // import {y} from 'x';
        ImportDeclaration: checkForImport,

        // export {name} from 'yo';
        ExportNamedDeclaration: checkForExport
    };

}

};

},{“../ast-utils”:124}],318:[function(require,module,exports){ /**

* @fileoverview Rule to enforce placing object properties on separate lines.
* @author Vitor Balocco
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "enforce placing object properties on separate lines",
        category: "Stylistic Issues",
        recommended: false
    },

    schema: [
        {
            type: "object",
            properties: {
                allowMultiplePropertiesPerLine: {
                    type: "boolean"
                }
            },
            additionalProperties: false
        }
    ]
},

create: function(context) {
    var allowSameLine = context.options[0] && Boolean(context.options[0].allowMultiplePropertiesPerLine);
    var errorMessage = allowSameLine ?
        "Object properties must go on a new line if they aren't all on the same line" :
        "Object properties must go on a new line";

    var sourceCode = context.getSourceCode();

    return {
        ObjectExpression: function(node) {
            var lastTokenOfPreviousProperty, firstTokenOfCurrentProperty;

            if (allowSameLine) {
                if (node.properties.length > 1) {
                    var firstTokenOfFirstProperty = sourceCode.getFirstToken(node.properties[0]);
                    var lastTokenOfLastProperty = sourceCode.getLastToken(node.properties[node.properties.length - 1]);

                    if (firstTokenOfFirstProperty.loc.end.line === lastTokenOfLastProperty.loc.start.line) {

                        // All keys and values are on the same line
                        return;
                    }
                }
            }

            for (var i = 1; i < node.properties.length; i++) {
                lastTokenOfPreviousProperty = sourceCode.getLastToken(node.properties[i - 1]);
                firstTokenOfCurrentProperty = sourceCode.getFirstToken(node.properties[i]);

                if (lastTokenOfPreviousProperty.loc.end.line === firstTokenOfCurrentProperty.loc.start.line) {
                    context.report({
                        node: node,
                        loc: firstTokenOfCurrentProperty.loc.start,
                        message: errorMessage
                    });
                }
            }
        }
    };
}

};

},{}],319:[function(require,module,exports){ /**

* @fileoverview Rule to enforce concise object methods and properties.
* @author Jamund Ferguson
*/

“use strict”;

var OPTIONS = {

always: "always",
never: "never",
methods: "methods",
properties: "properties"

};

//—————————————————————————— // Rule Definition //—————————————————————————— module.exports = {

meta: {
    docs: {
        description: "require or disallow method and property shorthand syntax for object literals",
        category: "ECMAScript 6",
        recommended: false
    },

    schema: {
        anyOf: [
            {
                type: "array",
                items: [
                    {
                        enum: ["always", "methods", "properties", "never"]
                    }
                ],
                minItems: 0,
                maxItems: 1
            },
            {
                type: "array",
                items: [
                    {
                        enum: ["always", "methods", "properties"]
                    },
                    {
                        type: "object",
                        properties: {
                            avoidQuotes: {
                                type: "boolean"
                            }
                        },
                        additionalProperties: false
                    }
                ],
                minItems: 0,
                maxItems: 2
            },
            {
                type: "array",
                items: [
                    {
                        enum: ["always", "methods"]
                    },
                    {
                        type: "object",
                        properties: {
                            ignoreConstructors: {
                                type: "boolean"
                            },
                            avoidQuotes: {
                                type: "boolean"
                            }
                        },
                        additionalProperties: false
                    }
                ],
                minItems: 0,
                maxItems: 2
            }
        ]
    }
},

create: function(context) {
    var APPLY = context.options[0] || OPTIONS.always;
    var APPLY_TO_METHODS = APPLY === OPTIONS.methods || APPLY === OPTIONS.always;
    var APPLY_TO_PROPS = APPLY === OPTIONS.properties || APPLY === OPTIONS.always;
    var APPLY_NEVER = APPLY === OPTIONS.never;

    var PARAMS = context.options[1] || {};
    var IGNORE_CONSTRUCTORS = PARAMS.ignoreConstructors;
    var AVOID_QUOTES = PARAMS.avoidQuotes;

    //--------------------------------------------------------------------------
    // Helpers
    //--------------------------------------------------------------------------

    /**
     * Determines if the first character of the name is a capital letter.
     * @param {string} name The name of the node to evaluate.
     * @returns {boolean} True if the first character of the property name is a capital letter, false if not.
     * @private
     */
    function isConstructor(name) {
        var firstChar = name.charAt(0);

        return firstChar === firstChar.toUpperCase();
    }

    /**
      * Checks whether a node is a string literal.
      * @param   {ASTNode} node - Any AST node.
      * @returns {boolean} `true` if it is a string literal.
      */
    function isStringLiteral(node) {
        return node.type === "Literal" && typeof node.value === "string";
    }

    //--------------------------------------------------------------------------
    // Public
    //--------------------------------------------------------------------------

    return {
        Property: function(node) {
            var isConciseProperty = node.method || node.shorthand,
                type;

            // Ignore destructuring assignment
            if (node.parent.type === "ObjectPattern") {
                return;
            }

            // if we're "never" and concise we should warn now
            if (APPLY_NEVER && isConciseProperty) {
                type = node.method ? "method" : "property";
                context.report(node, "Expected longform " + type + " syntax.");
            }

            // {'xyz'() {}} should be written as {'xyz': function() {}}
            if (AVOID_QUOTES && isStringLiteral(node.key) && isConciseProperty) {
                context.report(node, "Expected longform method syntax for string literal keys.");
            }

            // at this point if we're concise or if we're "never" we can leave
            if (APPLY_NEVER || AVOID_QUOTES || isConciseProperty) {
                return;
            }

            // only computed methods can fail the following checks
            if (node.computed && node.value.type !== "FunctionExpression") {
                return;
            }

            // getters and setters are ignored
            if (node.kind === "get" || node.kind === "set") {
                return;
            }

            if (node.value.type === "FunctionExpression" && !node.value.id && APPLY_TO_METHODS) {
                if (IGNORE_CONSTRUCTORS && isConstructor(node.key.name)) {
                    return;
                }

                // {x: function(){}} should be written as {x() {}}
                context.report(node, "Expected method shorthand.");
            } else if (node.value.type === "Identifier" && node.key.name === node.value.name && APPLY_TO_PROPS) {

                // {x: x} should be written as {x}
                context.report(node, "Expected property shorthand.");
            } else if (node.value.type === "Identifier" && node.key.type === "Literal" && node.key.value === node.value.name && APPLY_TO_PROPS) {

                // {"x": x} should be written as {x}
                context.report(node, "Expected property shorthand.");
            }
        }
    };
}

};

},{}],320:[function(require,module,exports){ /**

* @fileoverview Rule to check multiple var declarations per line
* @author Alberto Rodríguez
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "require or disallow newlines around `var` declarations",
        category: "Stylistic Issues",
        recommended: false
    },

    schema: [
        {
            enum: ["always", "initializations"]
        }
    ]
},

create: function(context) {

    var ERROR_MESSAGE = "Expected variable declaration to be on a new line.";
    var always = context.options[0] === "always";

    //--------------------------------------------------------------------------
    // Helpers
    //--------------------------------------------------------------------------

    /**
     * Determine if provided keyword is a variant of for specifiers
     * @private
     * @param {string} keyword - keyword to test
     * @returns {boolean} True if `keyword` is a variant of for specifier
     */
    function isForTypeSpecifier(keyword) {
        return keyword === "ForStatement" || keyword === "ForInStatement" || keyword === "ForOfStatement";
    }

    /**
     * Checks newlines around variable declarations.
     * @private
     * @param {ASTNode} node - `VariableDeclaration` node to test
     * @returns {void}
     */
    function checkForNewLine(node) {
        if (isForTypeSpecifier(node.parent.type)) {
            return;
        }

        var declarations = node.declarations;
        var prev;

        declarations.forEach(function(current) {
            if (prev && prev.loc.end.line === current.loc.start.line) {
                if (always || prev.init || current.init) {
                    context.report({
                        node: node,
                        message: ERROR_MESSAGE,
                        loc: current.loc.start
                    });
                }
            }
            prev = current;
        });
    }

    //--------------------------------------------------------------------------
    // Public
    //--------------------------------------------------------------------------

    return {
        VariableDeclaration: checkForNewLine
    };

}

};

},{}],321:[function(require,module,exports){ /**

* @fileoverview A rule to control the use of single variable declarations.
* @author Ian Christian Myers
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "enforce variables to be declared either together or separately in functions",
        category: "Stylistic Issues",
        recommended: false
    },

    schema: [
        {
            oneOf: [
                {
                    enum: ["always", "never"]
                },
                {
                    type: "object",
                    properties: {
                        var: {
                            enum: ["always", "never"]
                        },
                        let: {
                            enum: ["always", "never"]
                        },
                        const: {
                            enum: ["always", "never"]
                        }
                    },
                    additionalProperties: false
                },
                {
                    type: "object",
                    properties: {
                        initialized: {
                            enum: ["always", "never"]
                        },
                        uninitialized: {
                            enum: ["always", "never"]
                        }
                    },
                    additionalProperties: false
                }
            ]
        }
    ]
},

create: function(context) {

    var MODE_ALWAYS = "always",
        MODE_NEVER = "never";

    var mode = context.options[0] || MODE_ALWAYS;

    var options = {
    };

    if (typeof mode === "string") { // simple options configuration with just a string
        options.var = { uninitialized: mode, initialized: mode};
        options.let = { uninitialized: mode, initialized: mode};
        options.const = { uninitialized: mode, initialized: mode};
    } else if (typeof mode === "object") { // options configuration is an object
        if (mode.hasOwnProperty("var") && typeof mode.var === "string") {
            options.var = { uninitialized: mode.var, initialized: mode.var};
        }
        if (mode.hasOwnProperty("let") && typeof mode.let === "string") {
            options.let = { uninitialized: mode.let, initialized: mode.let};
        }
        if (mode.hasOwnProperty("const") && typeof mode.const === "string") {
            options.const = { uninitialized: mode.const, initialized: mode.const};
        }
        if (mode.hasOwnProperty("uninitialized")) {
            if (!options.var) {
                options.var = {};
            }
            if (!options.let) {
                options.let = {};
            }
            if (!options.const) {
                options.const = {};
            }
            options.var.uninitialized = mode.uninitialized;
            options.let.uninitialized = mode.uninitialized;
            options.const.uninitialized = mode.uninitialized;
        }
        if (mode.hasOwnProperty("initialized")) {
            if (!options.var) {
                options.var = {};
            }
            if (!options.let) {
                options.let = {};
            }
            if (!options.const) {
                options.const = {};
            }
            options.var.initialized = mode.initialized;
            options.let.initialized = mode.initialized;
            options.const.initialized = mode.initialized;
        }
    }

    //--------------------------------------------------------------------------
    // Helpers
    //--------------------------------------------------------------------------

    var functionStack = [];
    var blockStack = [];

    /**
     * Increments the blockStack counter.
     * @returns {void}
     * @private
     */
    function startBlock() {
        blockStack.push({
            let: {initialized: false, uninitialized: false},
            const: {initialized: false, uninitialized: false}
        });
    }

    /**
     * Increments the functionStack counter.
     * @returns {void}
     * @private
     */
    function startFunction() {
        functionStack.push({initialized: false, uninitialized: false});
        startBlock();
    }

    /**
     * Decrements the blockStack counter.
     * @returns {void}
     * @private
     */
    function endBlock() {
        blockStack.pop();
    }

    /**
     * Decrements the functionStack counter.
     * @returns {void}
     * @private
     */
    function endFunction() {
        functionStack.pop();
        endBlock();
    }

    /**
     * Records whether initialized or uninitialized variables are defined in current scope.
     * @param {string} statementType node.kind, one of: "var", "let", or "const"
     * @param {ASTNode[]} declarations List of declarations
     * @param {Object} currentScope The scope being investigated
     * @returns {void}
     * @private
     */
    function recordTypes(statementType, declarations, currentScope) {
        for (var i = 0; i < declarations.length; i++) {
            if (declarations[i].init === null) {
                if (options[statementType] && options[statementType].uninitialized === MODE_ALWAYS) {
                    currentScope.uninitialized = true;
                }
            } else {
                if (options[statementType] && options[statementType].initialized === MODE_ALWAYS) {
                    currentScope.initialized = true;
                }
            }
        }
    }

    /**
     * Determines the current scope (function or block)
     * @param  {string} statementType node.kind, one of: "var", "let", or "const"
     * @returns {Object} The scope associated with statementType
     */
    function getCurrentScope(statementType) {
        var currentScope;

        if (statementType === "var") {
            currentScope = functionStack[functionStack.length - 1];
        } else if (statementType === "let") {
            currentScope = blockStack[blockStack.length - 1].let;
        } else if (statementType === "const") {
            currentScope = blockStack[blockStack.length - 1].const;
        }
        return currentScope;
    }

    /**
     * Counts the number of initialized and uninitialized declarations in a list of declarations
     * @param {ASTNode[]} declarations List of declarations
     * @returns {Object} Counts of 'uninitialized' and 'initialized' declarations
     * @private
     */
    function countDeclarations(declarations) {
        var counts = { uninitialized: 0, initialized: 0 };

        for (var i = 0; i < declarations.length; i++) {
            if (declarations[i].init === null) {
                counts.uninitialized++;
            } else {
                counts.initialized++;
            }
        }
        return counts;
    }

    /**
     * Determines if there is more than one var statement in the current scope.
     * @param {string} statementType node.kind, one of: "var", "let", or "const"
     * @param {ASTNode[]} declarations List of declarations
     * @returns {boolean} Returns true if it is the first var declaration, false if not.
     * @private
     */
    function hasOnlyOneStatement(statementType, declarations) {

        var declarationCounts = countDeclarations(declarations);
        var currentOptions = options[statementType] || {};
        var currentScope = getCurrentScope(statementType);

        if (currentOptions.uninitialized === MODE_ALWAYS && currentOptions.initialized === MODE_ALWAYS) {
            if (currentScope.uninitialized || currentScope.initialized) {
                return false;
            }
        }

        if (declarationCounts.uninitialized > 0) {
            if (currentOptions.uninitialized === MODE_ALWAYS && currentScope.uninitialized) {
                return false;
            }
        }
        if (declarationCounts.initialized > 0) {
            if (currentOptions.initialized === MODE_ALWAYS && currentScope.initialized) {
                return false;
            }
        }
        recordTypes(statementType, declarations, currentScope);
        return true;
    }

    //--------------------------------------------------------------------------
    // Public API
    //--------------------------------------------------------------------------

    return {
        Program: startFunction,
        FunctionDeclaration: startFunction,
        FunctionExpression: startFunction,
        ArrowFunctionExpression: startFunction,
        BlockStatement: startBlock,
        ForStatement: startBlock,
        ForInStatement: startBlock,
        ForOfStatement: startBlock,
        SwitchStatement: startBlock,

        VariableDeclaration: function(node) {
            var parent = node.parent,
                type, declarations, declarationCounts;

            type = node.kind;
            if (!options[type]) {
                return;
            }

            declarations = node.declarations;
            declarationCounts = countDeclarations(declarations);

            // always
            if (!hasOnlyOneStatement(type, declarations)) {
                if (options[type].initialized === MODE_ALWAYS && options[type].uninitialized === MODE_ALWAYS) {
                    context.report(node, "Combine this with the previous '" + type + "' statement.");
                } else {
                    if (options[type].initialized === MODE_ALWAYS) {
                        context.report(node, "Combine this with the previous '" + type + "' statement with initialized variables.");
                    }
                    if (options[type].uninitialized === MODE_ALWAYS) {
                        if (node.parent.left === node && (node.parent.type === "ForInStatement" || node.parent.type === "ForOfStatement")) {
                            return;
                        }
                        context.report(node, "Combine this with the previous '" + type + "' statement with uninitialized variables.");
                    }
                }
            }

            // never
            if (parent.type !== "ForStatement" || parent.init !== node) {
                var totalDeclarations = declarationCounts.uninitialized + declarationCounts.initialized;

                if (totalDeclarations > 1) {

                    if (options[type].initialized === MODE_NEVER && options[type].uninitialized === MODE_NEVER) {

                        // both initialized and uninitialized
                        context.report(node, "Split '" + type + "' declarations into multiple statements.");
                    } else if (options[type].initialized === MODE_NEVER && declarationCounts.initialized > 0) {

                        // initialized
                        context.report(node, "Split initialized '" + type + "' declarations into multiple statements.");
                    } else if (options[type].uninitialized === MODE_NEVER && declarationCounts.uninitialized > 0) {

                        // uninitialized
                        context.report(node, "Split uninitialized '" + type + "' declarations into multiple statements.");
                    }
                }
            }
        },

        "ForStatement:exit": endBlock,
        "ForOfStatement:exit": endBlock,
        "ForInStatement:exit": endBlock,
        "SwitchStatement:exit": endBlock,
        "BlockStatement:exit": endBlock,
        "Program:exit": endFunction,
        "FunctionDeclaration:exit": endFunction,
        "FunctionExpression:exit": endFunction,
        "ArrowFunctionExpression:exit": endFunction
    };

}

};

},{}],322:[function(require,module,exports){ /**

* @fileoverview Rule to replace assignment expressions with operator assignment
* @author Brandon Mills
*/

“use strict”;

//—————————————————————————— // Helpers //——————————————————————————

/**

* Checks whether an operator is commutative and has an operator assignment
* shorthand form.
* @param   {string}  operator Operator to check.
* @returns {boolean}          True if the operator is commutative and has a
*     shorthand form.
*/

function isCommutativeOperatorWithShorthand(operator) {

return ["*", "&", "^", "|"].indexOf(operator) >= 0;

}

/**

* Checks whether an operator is not commuatative and has an operator assignment
* shorthand form.
* @param   {string}  operator Operator to check.
* @returns {boolean}          True if the operator is not commuatative and has
*     a shorthand form.
*/

function isNonCommutativeOperatorWithShorthand(operator) {

return ["+", "-", "/", "%", "<<", ">>", ">>>"].indexOf(operator) >= 0;

}

//—————————————————————————— // Rule Definition //——————————————————————————

/**

* Checks whether two expressions reference the same value. For example:
*     a = a
*     a.b = a.b
*     a[0] = a[0]
*     a['b'] = a['b']
* @param   {ASTNode} a Left side of the comparison.
* @param   {ASTNode} b Right side of the comparison.
* @returns {boolean}   True if both sides match and reference the same value.
*/

function same(a, b) {

if (a.type !== b.type) {
    return false;
}

switch (a.type) {
    case "Identifier":
        return a.name === b.name;

    case "Literal":
        return a.value === b.value;

    case "MemberExpression":

        /*
         * x[0] = x[0]
         * x[y] = x[y]
         * x.y = x.y
         */
        return same(a.object, b.object) && same(a.property, b.property);

    default:
        return false;
}

}

module.exports = {

meta: {
    docs: {
        description: "require or disallow assignment operator shorthand where possible",
        category: "Stylistic Issues",
        recommended: false
    },

    schema: [
        {
            enum: ["always", "never"]
        }
    ]
},

create: function(context) {

    /**
     * Ensures that an assignment uses the shorthand form where possible.
     * @param   {ASTNode} node An AssignmentExpression node.
     * @returns {void}
     */
    function verify(node) {
        var expr, left, operator;

        if (node.operator !== "=" || node.right.type !== "BinaryExpression") {
            return;
        }

        left = node.left;
        expr = node.right;
        operator = expr.operator;

        if (isCommutativeOperatorWithShorthand(operator)) {
            if (same(left, expr.left) || same(left, expr.right)) {
                context.report(node, "Assignment can be replaced with operator assignment.");
            }
        } else if (isNonCommutativeOperatorWithShorthand(operator)) {
            if (same(left, expr.left)) {
                context.report(node, "Assignment can be replaced with operator assignment.");
            }
        }
    }

    /**
     * Warns if an assignment expression uses operator assignment shorthand.
     * @param   {ASTNode} node An AssignmentExpression node.
     * @returns {void}
     */
    function prohibit(node) {
        if (node.operator !== "=") {
            context.report(node, "Unexpected operator assignment shorthand.");
        }
    }

    return {
        AssignmentExpression: context.options[0] !== "never" ? verify : prohibit
    };

}

};

},{}],323:[function(require,module,exports){ /**

* @fileoverview Operator linebreak - enforces operator linebreak style of two types: after and before
* @author Benoît Zugmeyer
*/

“use strict”;

var lodash = require(“lodash”),

astUtils = require("../ast-utils");

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "enforce consistent linebreak style for operators",
        category: "Stylistic Issues",
        recommended: false
    },

    schema: [
        {
            enum: ["after", "before", "none", null]
        },
        {
            type: "object",
            properties: {
                overrides: {
                    type: "object",
                    properties: {
                        anyOf: {
                            type: "string",
                            enum: ["after", "before", "none", "ignore"]
                        }
                    }
                }
            },
            additionalProperties: false
        }
    ]
},

create: function(context) {

    var usedDefaultGlobal = !context.options[0];
    var globalStyle = context.options[0] || "after";
    var options = context.options[1] || {};
    var styleOverrides = options.overrides ? lodash.assign({}, options.overrides) : {};

    if (usedDefaultGlobal && !styleOverrides["?"]) {
        styleOverrides["?"] = "before";
    }

    if (usedDefaultGlobal && !styleOverrides[":"]) {
        styleOverrides[":"] = "before";
    }

    var sourceCode = context.getSourceCode();

    //--------------------------------------------------------------------------
    // Helpers
    //--------------------------------------------------------------------------

    /**
     * Checks the operator placement
     * @param {ASTNode} node The node to check
     * @param {ASTNode} leftSide The node that comes before the operator in `node`
     * @private
     * @returns {void}
     */
    function validateNode(node, leftSide) {
        var leftToken = sourceCode.getLastToken(leftSide);
        var operatorToken = sourceCode.getTokenAfter(leftToken);

        // When the left part of a binary expression is a single expression wrapped in
        // parentheses (ex: `(a) + b`), leftToken will be the last token of the expression
        // and operatorToken will be the closing parenthesis.
        // The leftToken should be the last closing parenthesis, and the operatorToken
        // should be the token right after that.
        while (operatorToken.value === ")") {
            leftToken = operatorToken;
            operatorToken = sourceCode.getTokenAfter(operatorToken);
        }

        var rightToken = sourceCode.getTokenAfter(operatorToken);
        var operator = operatorToken.value;
        var operatorStyleOverride = styleOverrides[operator];
        var style = operatorStyleOverride || globalStyle;

        // if single line
        if (astUtils.isTokenOnSameLine(leftToken, operatorToken) &&
                astUtils.isTokenOnSameLine(operatorToken, rightToken)) {

            return;

        } else if (operatorStyleOverride !== "ignore" && !astUtils.isTokenOnSameLine(leftToken, operatorToken) &&
                !astUtils.isTokenOnSameLine(operatorToken, rightToken)) {

            // lone operator
            context.report(node, {
                line: operatorToken.loc.end.line,
                column: operatorToken.loc.end.column
            }, "Bad line breaking before and after '" + operator + "'.");

        } else if (style === "before" && astUtils.isTokenOnSameLine(leftToken, operatorToken)) {

            context.report(node, {
                line: operatorToken.loc.end.line,
                column: operatorToken.loc.end.column
            }, "'" + operator + "' should be placed at the beginning of the line.");

        } else if (style === "after" && astUtils.isTokenOnSameLine(operatorToken, rightToken)) {

            context.report(node, {
                line: operatorToken.loc.end.line,
                column: operatorToken.loc.end.column
            }, "'" + operator + "' should be placed at the end of the line.");

        } else if (style === "none") {

            context.report(node, {
                line: operatorToken.loc.end.line,
                column: operatorToken.loc.end.column
            }, "There should be no line break before or after '" + operator + "'");

        }
    }

    /**
     * Validates a binary expression using `validateNode`
     * @param {BinaryExpression|LogicalExpression|AssignmentExpression} node node to be validated
     * @returns {void}
     */
    function validateBinaryExpression(node) {
        validateNode(node, node.left);
    }

    //--------------------------------------------------------------------------
    // Public
    //--------------------------------------------------------------------------

    return {
        BinaryExpression: validateBinaryExpression,
        LogicalExpression: validateBinaryExpression,
        AssignmentExpression: validateBinaryExpression,
        VariableDeclarator: function(node) {
            if (node.init) {
                validateNode(node, node.id);
            }
        },
        ConditionalExpression: function(node) {
            validateNode(node, node.test);
            validateNode(node, node.consequent);
        }
    };
}

};

},{“../ast-utils”:124,“lodash”:108}],324:[function(require,module,exports){ /**

* @fileoverview A rule to ensure blank lines within blocks.
* @author Mathias Schreck <https://github.com/lo1tuma>
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "require or disallow padding within blocks",
        category: "Stylistic Issues",
        recommended: false
    },

    fixable: "whitespace",

    schema: [
        {
            oneOf: [
                {
                    enum: ["always", "never"]
                },
                {
                    type: "object",
                    properties: {
                        blocks: {
                            enum: ["always", "never"]
                        },
                        switches: {
                            enum: ["always", "never"]
                        },
                        classes: {
                            enum: ["always", "never"]
                        }
                    },
                    additionalProperties: false,
                    minProperties: 1
                }
            ]
        }
    ]
},

create: function(context) {
    var options = {};
    var config = context.options[0] || "always";

    if (typeof config === "string") {
        options.blocks = config === "always";
    } else {
        if (config.hasOwnProperty("blocks")) {
            options.blocks = config.blocks === "always";
        }
        if (config.hasOwnProperty("switches")) {
            options.switches = config.switches === "always";
        }
        if (config.hasOwnProperty("classes")) {
            options.classes = config.classes === "always";
        }
    }

    var ALWAYS_MESSAGE = "Block must be padded by blank lines.",
        NEVER_MESSAGE = "Block must not be padded by blank lines.";

    var sourceCode = context.getSourceCode();

    /**
     * Gets the open brace token from a given node.
     * @param {ASTNode} node - A BlockStatement or SwitchStatement node from which to get the open brace.
     * @returns {Token} The token of the open brace.
     */
    function getOpenBrace(node) {
        if (node.type === "SwitchStatement") {
            return sourceCode.getTokenBefore(node.cases[0]);
        }
        return sourceCode.getFirstToken(node);
    }

    /**
     * Checks if the given parameter is a comment node
     * @param {ASTNode|Token} node An AST node or token
     * @returns {boolean} True if node is a comment
     */
    function isComment(node) {
        return node.type === "Line" || node.type === "Block";
    }

    /**
     * Checks if the given token has a blank line after it.
     * @param {Token} token The token to check.
     * @returns {boolean} Whether or not the token is followed by a blank line.
     */
    function isTokenTopPadded(token) {
        var tokenStartLine = token.loc.start.line,
            expectedFirstLine = tokenStartLine + 2,
            first,
            firstLine;

        first = token;
        do {
            first = sourceCode.getTokenOrCommentAfter(first);
        } while (isComment(first) && first.loc.start.line === tokenStartLine);

        firstLine = first.loc.start.line;
        return expectedFirstLine <= firstLine;
    }

    /**
     * Checks if the given token is preceeded by a blank line.
     * @param {Token} token The token to check
     * @returns {boolean} Whether or not the token is preceeded by a blank line
     */
    function isTokenBottomPadded(token) {
        var blockEnd = token.loc.end.line,
            expectedLastLine = blockEnd - 2,
            last,
            lastLine;

        last = token;
        do {
            last = sourceCode.getTokenOrCommentBefore(last);
        } while (isComment(last) && last.loc.end.line === blockEnd);

        lastLine = last.loc.end.line;
        return lastLine <= expectedLastLine;
    }

    /**
     * Checks if a node should be padded, according to the rule config.
     * @param {ASTNode} node The AST node to check.
     * @returns {boolean} True if the node should be padded, false otherwise.
     */
    function requirePaddingFor(node) {
        switch (node.type) {
            case "BlockStatement":
                return options.blocks;
            case "SwitchStatement":
                return options.switches;
            case "ClassBody":
                return options.classes;

            /* istanbul ignore next */
            default:
                throw new Error("unreachable");
        }
    }

    /**
     * Checks the given BlockStatement node to be padded if the block is not empty.
     * @param {ASTNode} node The AST node of a BlockStatement.
     * @returns {void} undefined.
     */
    function checkPadding(node) {
        var openBrace = getOpenBrace(node),
            closeBrace = sourceCode.getLastToken(node),
            blockHasTopPadding = isTokenTopPadded(openBrace),
            blockHasBottomPadding = isTokenBottomPadded(closeBrace);

        if (requirePaddingFor(node)) {
            if (!blockHasTopPadding) {
                context.report({
                    node: node,
                    loc: { line: openBrace.loc.start.line, column: openBrace.loc.start.column },
                    fix: function(fixer) {
                        return fixer.insertTextAfter(openBrace, "\n");
                    },
                    message: ALWAYS_MESSAGE
                });
            }
            if (!blockHasBottomPadding) {
                context.report({
                    node: node,
                    loc: {line: closeBrace.loc.end.line, column: closeBrace.loc.end.column - 1 },
                    fix: function(fixer) {
                        return fixer.insertTextBefore(closeBrace, "\n");
                    },
                    message: ALWAYS_MESSAGE
                });
            }
        } else {
            if (blockHasTopPadding) {
                var nextToken = sourceCode.getTokenOrCommentAfter(openBrace);

                context.report({
                    node: node,
                    loc: { line: openBrace.loc.start.line, column: openBrace.loc.start.column },
                    fix: function(fixer) {
                        return fixer.replaceTextRange([openBrace.end, nextToken.start], "\n");
                    },
                    message: NEVER_MESSAGE
                });
            }

            if (blockHasBottomPadding) {
                var previousToken = sourceCode.getTokenOrCommentBefore(closeBrace);

                context.report({
                    node: node,
                    loc: {line: closeBrace.loc.end.line, column: closeBrace.loc.end.column - 1 },
                    message: NEVER_MESSAGE,
                    fix: function(fixer) {
                        return fixer.replaceTextRange([previousToken.end, closeBrace.start], "\n");
                    }
                });
            }
        }
    }

    var rule = {};

    if (options.hasOwnProperty("switches")) {
        rule.SwitchStatement = function(node) {
            if (node.cases.length === 0) {
                return;
            }
            checkPadding(node);
        };
    }

    if (options.hasOwnProperty("blocks")) {
        rule.BlockStatement = function(node) {
            if (node.body.length === 0) {
                return;
            }
            checkPadding(node);
        };
    }

    if (options.hasOwnProperty("classes")) {
        rule.ClassBody = function(node) {
            if (node.body.length === 0) {
                return;
            }
            checkPadding(node);
        };
    }

    return rule;
}

};

},{}],325:[function(require,module,exports){ /**

* @fileoverview A rule to suggest using arrow functions as callbacks.
* @author Toru Nagashima
*/

“use strict”;

//—————————————————————————— // Helpers //——————————————————————————

/**

* Checks whether or not a given variable is a function name.
* @param {escope.Variable} variable - A variable to check.
* @returns {boolean} `true` if the variable is a function name.
*/

function isFunctionName(variable) {

return variable && variable.defs[0].type === "FunctionName";

}

/**

* Checks whether or not a given MetaProperty node equals to a given value.
* @param {ASTNode} node - A MetaProperty node to check.
* @param {string} metaName - The name of `MetaProperty.meta`.
* @param {string} propertyName - The name of `MetaProperty.property`.
* @returns {boolean} `true` if the node is the specific value.
*/

function checkMetaProperty(node, metaName, propertyName) {

return node.meta.name === metaName && node.property.name === propertyName;

}

/**

* Gets the variable object of `arguments` which is defined implicitly.
* @param {escope.Scope} scope - A scope to get.
* @returns {escope.Variable} The found variable object.
*/

function getVariableOfArguments(scope) {

var variables = scope.variables;

for (var i = 0; i < variables.length; ++i) {
    var variable = variables[i];

    if (variable.name === "arguments") {

        /*
         * If there was a parameter which is named "arguments", the
         * implicit "arguments" is not defined.
         * So does fast return with null.
         */
        return (variable.identifiers.length === 0) ? variable : null;
    }
}

/* istanbul ignore next */
return null;

}

/**

* Checkes whether or not a given node is a callback.
* @param {ASTNode} node - A node to check.
* @returns {object}
*   {boolean} retv.isCallback - `true` if the node is a callback.
*   {boolean} retv.isLexicalThis - `true` if the node is with `.bind(this)`.
*/

function getCallbackInfo(node) {

var retv = {isCallback: false, isLexicalThis: false};
var parent = node.parent;

while (node) {
    switch (parent.type) {

        // Checks parents recursively.

        case "LogicalExpression":
        case "ConditionalExpression":
            break;

        // Checks whether the parent node is `.bind(this)` call.
        case "MemberExpression":
            if (parent.object === node &&
                !parent.property.computed &&
                parent.property.type === "Identifier" &&
                parent.property.name === "bind" &&
                parent.parent.type === "CallExpression" &&
                parent.parent.callee === parent
            ) {
                retv.isLexicalThis = (
                    parent.parent.arguments.length === 1 &&
                    parent.parent.arguments[0].type === "ThisExpression"
                );
                node = parent;
                parent = parent.parent;
            } else {
                return retv;
            }
            break;

        // Checks whether the node is a callback.
        case "CallExpression":
        case "NewExpression":
            if (parent.callee !== node) {
                retv.isCallback = true;
            }
            return retv;

        default:
            return retv;
    }

    node = parent;
    parent = parent.parent;
}

/* istanbul ignore next */
throw new Error("unreachable");

}

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "require arrow functions as callbacks",
        category: "ECMAScript 6",
        recommended: false
    },

    schema: [
        {
            type: "object",
            properties: {
                allowNamedFunctions: {
                    type: "boolean"
                },
                allowUnboundThis: {
                    type: "boolean"
                }
            },
            additionalProperties: false
        }
    ]
},

create: function(context) {
    var options = context.options[0] || {};

    var allowUnboundThis = options.allowUnboundThis !== false;  // default to true
    var allowNamedFunctions = options.allowNamedFunctions;

    /*
     * {Array<{this: boolean, super: boolean, meta: boolean}>}
     * - this - A flag which shows there are one or more ThisExpression.
     * - super - A flag which shows there are one or more Super.
     * - meta - A flag which shows there are one or more MethProperty.
     */
    var stack = [];

    /**
     * Pushes new function scope with all `false` flags.
     * @returns {void}
     */
    function enterScope() {
        stack.push({this: false, super: false, meta: false});
    }

    /**
     * Pops a function scope from the stack.
     * @returns {{this: boolean, super: boolean, meta: boolean}} The information of the last scope.
     */
    function exitScope() {
        return stack.pop();
    }

    return {

        // Reset internal state.
        Program: function() {
            stack = [];
        },

        // If there are below, it cannot replace with arrow functions merely.
        ThisExpression: function() {
            var info = stack[stack.length - 1];

            if (info) {
                info.this = true;
            }
        },

        Super: function() {
            var info = stack[stack.length - 1];

            if (info) {
                info.super = true;
            }
        },

        MetaProperty: function(node) {
            var info = stack[stack.length - 1];

            if (info && checkMetaProperty(node, "new", "target")) {
                info.meta = true;
            }
        },

        // To skip nested scopes.
        FunctionDeclaration: enterScope,
        "FunctionDeclaration:exit": exitScope,

        // Main.
        FunctionExpression: enterScope,
        "FunctionExpression:exit": function(node) {
            var scopeInfo = exitScope();

            // Skip named function expressions
            if (allowNamedFunctions && node.id && node.id.name) {
                return;
            }

            // Skip generators.
            if (node.generator) {
                return;
            }

            // Skip recursive functions.
            var nameVar = context.getDeclaredVariables(node)[0];

            if (isFunctionName(nameVar) && nameVar.references.length > 0) {
                return;
            }

            // Skip if it's using arguments.
            var variable = getVariableOfArguments(context.getScope());

            if (variable && variable.references.length > 0) {
                return;
            }

            // Reports if it's a callback which can replace with arrows.
            var callbackInfo = getCallbackInfo(node);

            if (callbackInfo.isCallback &&
                (!allowUnboundThis || !scopeInfo.this || callbackInfo.isLexicalThis) &&
                !scopeInfo.super &&
                !scopeInfo.meta
            ) {
                context.report(node, "Unexpected function expression.");
            }
        }
    };
}

};

},{}],326:[function(require,module,exports){ /**

* @fileoverview A rule to suggest using of const declaration for variables that are never reassigned after declared.
* @author Toru Nagashima
*/

“use strict”;

//—————————————————————————— // Requirements //——————————————————————————

var Map = require(“es6-map”);

//—————————————————————————— // Helpers //——————————————————————————

var PATTERN_TYPE = /^(?:.+?Pattern|RestElement|Property)$/; var DECLARATION_HOST_TYPE = /^(?:Program|BlockStatement|SwitchCase)$/; var DESTRUCTURING_HOST_TYPE = /^(?:VariableDeclarator|AssignmentExpression)$/;

/**

* Adds multiple items to the tail of an array.
*
* @param {any[]} array - A destination to add.
* @param {any[]} values - Items to be added.
* @returns {void}
*/

var pushAll = Function.apply.bind(Array.prototype.push);

/**

* Checks whether a given node is located at `ForStatement.init` or not.
*
* @param {ASTNode} node - A node to check.
* @returns {boolean} `true` if the node is located at `ForStatement.init`.
*/

function isInitOfForStatement(node) {

return node.parent.type === "ForStatement" && node.parent.init === node;

}

/**

* Checks whether a given Identifier node becomes a VariableDeclaration or not.
*
* @param {ASTNode} identifier - An Identifier node to check.
* @returns {boolean} `true` if the node can become a VariableDeclaration.
*/

function canBecomeVariableDeclaration(identifier) {

var node = identifier.parent;

while (PATTERN_TYPE.test(node.type)) {
    node = node.parent;
}

return (
    node.type === "VariableDeclarator" ||
    (
        node.type === "AssignmentExpression" &&
        node.parent.type === "ExpressionStatement" &&
        DECLARATION_HOST_TYPE.test(node.parent.parent.type)
    )
);

}

/**

* Gets an identifier node of a given variable.
*
* If the initialization exists or one or more reading references exist before
* the first assignment, the identifier node is the node of the declaration.
* Otherwise, the identifier node is the node of the first assignment.
*
* If the variable should not change to const, this function returns null.
* - If the variable is reassigned.
* - If the variable is never initialized and assigned.
* - If the variable is initialized in a different scope from the declaration.
* - If the unique assignment of the variable cannot change to a declaration.
*
* @param {escope.Variable} variable - A variable to get.
* @param {boolean} ignoreReadBeforeAssign -
*      The value of `ignoreReadBeforeAssign` option.
* @returns {ASTNode|null}
*      An Identifier node if the variable should change to const.
*      Otherwise, null.
*/

function getIdentifierIfShouldBeConst(variable, ignoreReadBeforeAssign) {

if (variable.eslintUsed) {
    return null;
}

// Finds the unique WriteReference.
var writer = null;
var isReadBeforeInit = false;
var references = variable.references;

for (var i = 0; i < references.length; ++i) {
    var reference = references[i];

    if (reference.isWrite()) {
        var isReassigned = (
            writer !== null &&
            writer.identifier !== reference.identifier
        );

        if (isReassigned) {
            return null;
        }
        writer = reference;

    } else if (reference.isRead() && writer === null) {
        if (ignoreReadBeforeAssign) {
            return null;
        }
        isReadBeforeInit = true;
    }
}

// If the assignment is from a different scope, ignore it.
// If the assignment cannot change to a declaration, ignore it.
var shouldBeConst = (
    writer !== null &&
    writer.from === variable.scope &&
    canBecomeVariableDeclaration(writer.identifier)
);

if (!shouldBeConst) {
    return null;
}
if (isReadBeforeInit) {
    return variable.defs[0].name;
}
return writer.identifier;

}

/**

* Gets the VariableDeclarator/AssignmentExpression node that a given reference
* belongs to.
* This is used to detect a mix of reassigned and never reassigned in a
* destructuring.
*
* @param {escope.Reference} reference - A reference to get.
* @returns {ASTNode|null} A VariableDeclarator/AssignmentExpression node or
*      null.
*/

function getDestructuringHost(reference) {

if (!reference.isWrite()) {
    return null;
}
var node = reference.identifier.parent;

while (PATTERN_TYPE.test(node.type)) {
    node = node.parent;
}

if (!DESTRUCTURING_HOST_TYPE.test(node.type)) {
    return null;
}
return node;

}

/**

* Groups by the VariableDeclarator/AssignmentExpression node that each
* reference of given variables belongs to.
* This is used to detect a mix of reassigned and never reassigned in a
* destructuring.
*
* @param {escope.Variable[]} variables - Variables to group by destructuring.
* @param {boolean} ignoreReadBeforeAssign -
*      The value of `ignoreReadBeforeAssign` option.
* @returns {Map<ASTNode, ASTNode[]>} Grouped identifier nodes.
*/

function groupByDestructuring(variables, ignoreReadBeforeAssign) {

var identifierMap = new Map();

for (var i = 0; i < variables.length; ++i) {
    var variable = variables[i];
    var references = variable.references;
    var identifier = getIdentifierIfShouldBeConst(variable, ignoreReadBeforeAssign);
    var prevId = null;

    for (var j = 0; j < references.length; ++j) {
        var reference = references[j];
        var id = reference.identifier;

        // Avoid counting a reference twice or more for default values of
        // destructuring.
        if (id === prevId) {
            continue;
        }
        prevId = id;

        // Add the identifier node into the destructuring group.
        var group = getDestructuringHost(reference);

        if (group) {
            if (identifierMap.has(group)) {
                identifierMap.get(group).push(identifier);
            } else {
                identifierMap.set(group, [identifier]);
            }
        }
    }
}

return identifierMap;

}

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "require `const` declarations for variables that are never reassigned after declared",
        category: "ECMAScript 6",
        recommended: false
    },

    schema: [
        {
            type: "object",
            properties: {
                destructuring: {enum: ["any", "all"]},
                ignoreReadBeforeAssign: {type: "boolean"}
            },
            additionalProperties: false
        }
    ]
},

create: function(context) {
    var options = context.options[0] || {};
    var checkingMixedDestructuring = options.destructuring !== "all";
    var ignoreReadBeforeAssign = options.ignoreReadBeforeAssign === true;
    var variables = null;

    /**
     * Reports a given Identifier node.
     *
     * @param {ASTNode} node - An Identifier node to report.
     * @returns {void}
     */
    function report(node) {
        context.report({
            node: node,
            message: "'{{name}}' is never reassigned, use 'const' instead.",
            data: node
        });
    }

    /**
     * Reports a given variable if the variable should be declared as const.
     *
     * @param {escope.Variable} variable - A variable to report.
     * @returns {void}
     */
    function checkVariable(variable) {
        var node = getIdentifierIfShouldBeConst(variable, ignoreReadBeforeAssign);

        if (node) {
            report(node);
        }
    }

    /**
     * Reports given identifier nodes if all of the nodes should be declared
     * as const.
     *
     * The argument 'nodes' is an array of Identifier nodes.
     * This node is the result of 'getIdentifierIfShouldBeConst()', so it's
     * nullable. In simple declaration or assignment cases, the length of
     * the array is 1. In destructuring cases, the length of the array can
     * be 2 or more.
     *
     * @param {(escope.Reference|null)[]} nodes -
     *      References which are grouped by destructuring to report.
     * @returns {void}
     */
    function checkGroup(nodes) {
        if (nodes.every(Boolean)) {
            nodes.forEach(report);
        }
    }

    return {
        Program: function() {
            variables = [];
        },

        "Program:exit": function() {
            if (checkingMixedDestructuring) {
                variables.forEach(checkVariable);
            } else {
                groupByDestructuring(variables, ignoreReadBeforeAssign)
                    .forEach(checkGroup);
            }

            variables = null;
        },

        VariableDeclaration: function(node) {
            if (node.kind === "let" && !isInitOfForStatement(node)) {
                pushAll(variables, context.getDeclaredVariables(node));
            }
        }
    };
}

};

},{“es6-map”:59}],327:[function(require,module,exports){ /**

* @fileoverview Rule to suggest using "Reflect" api over Function/Object methods
* @author Keith Cirkel <http://keithcirkel.co.uk>
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "require `Reflect` methods where applicable",
        category: "ECMAScript 6",
        recommended: false
    },

    schema: [
        {
            type: "object",
            properties: {
                exceptions: {
                    type: "array",
                    items: {
                        enum: [
                            "apply",
                            "call",
                            "delete",
                            "defineProperty",
                            "getOwnPropertyDescriptor",
                            "getPrototypeOf",
                            "setPrototypeOf",
                            "isExtensible",
                            "getOwnPropertyNames",
                            "preventExtensions"
                        ]
                    },
                    uniqueItems: true
                }
            },
            additionalProperties: false
        }
    ]
},

create: function(context) {
    var existingNames = {
        apply: "Function.prototype.apply",
        call: "Function.prototype.call",
        defineProperty: "Object.defineProperty",
        getOwnPropertyDescriptor: "Object.getOwnPropertyDescriptor",
        getPrototypeOf: "Object.getPrototypeOf",
        setPrototypeOf: "Object.setPrototypeOf",
        isExtensible: "Object.isExtensible",
        getOwnPropertyNames: "Object.getOwnPropertyNames",
        preventExtensions: "Object.preventExtensions"
    };

    var reflectSubsitutes = {
        apply: "Reflect.apply",
        call: "Reflect.apply",
        defineProperty: "Reflect.defineProperty",
        getOwnPropertyDescriptor: "Reflect.getOwnPropertyDescriptor",
        getPrototypeOf: "Reflect.getPrototypeOf",
        setPrototypeOf: "Reflect.setPrototypeOf",
        isExtensible: "Reflect.isExtensible",
        getOwnPropertyNames: "Reflect.getOwnPropertyNames",
        preventExtensions: "Reflect.preventExtensions"
    };

    var exceptions = (context.options[0] || {}).exceptions || [];

    /**
     * Reports the Reflect violation based on the `existing` and `substitute`
     * @param {Object} node The node that violates the rule.
     * @param {string} existing The existing method name that has been used.
     * @param {string} substitute The Reflect substitute that should be used.
     * @returns {void}
     */
    function report(node, existing, substitute) {
        context.report(node, "Avoid using {{existing}}, instead use {{substitute}}", {
            existing: existing,
            substitute: substitute
        });
    }

    return {
        CallExpression: function(node) {
            var methodName = (node.callee.property || {}).name;
            var isReflectCall = (node.callee.object || {}).name === "Reflect";
            var hasReflectSubsitute = reflectSubsitutes.hasOwnProperty(methodName);
            var userConfiguredException = exceptions.indexOf(methodName) !== -1;

            if (hasReflectSubsitute && !isReflectCall && !userConfiguredException) {
                report(node, existingNames[methodName], reflectSubsitutes[methodName]);
            }
        },
        UnaryExpression: function(node) {
            var isDeleteOperator = node.operator === "delete";
            var targetsIdentifier = node.argument.type === "Identifier";
            var userConfiguredException = exceptions.indexOf("delete") !== -1;

            if (isDeleteOperator && !targetsIdentifier && !userConfiguredException) {
                report(node, "the delete keyword", "Reflect.deleteProperty");
            }
        }
    };

}

};

},{}],328:[function(require,module,exports){ /**

* @fileoverview Rule to
* @author Toru Nagashima
*/

“use strict”;

//—————————————————————————— // Helpers //——————————————————————————

/**

* Gets the variable object of `arguments` which is defined implicitly.
* @param {escope.Scope} scope - A scope to get.
* @returns {escope.Variable} The found variable object.
*/

function getVariableOfArguments(scope) {

var variables = scope.variables;

for (var i = 0; i < variables.length; ++i) {
    var variable = variables[i];

    if (variable.name === "arguments") {

        // If there was a parameter which is named "arguments", the implicit "arguments" is not defined.
        // So does fast return with null.
        return (variable.identifiers.length === 0) ? variable : null;
    }
}

/* istanbul ignore next : unreachable */
return null;

}

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "require rest parameters instead of `arguments`",
        category: "ECMAScript 6",
        recommended: false
    },

    schema: []
},

create: function(context) {

    /**
     * Reports a given reference.
     *
     * @param {escope.Reference} reference - A reference to report.
     * @returns {void}
     */
    function report(reference) {
        context.report({
            node: reference.identifier,
            message: "Use the rest parameters instead of 'arguments'."
        });
    }

    /**
     * Reports references of the implicit `arguments` variable if exist.
     *
     * @returns {void}
     */
    function checkForArguments() {
        var argumentsVar = getVariableOfArguments(context.getScope());

        if (argumentsVar) {
            argumentsVar.references.forEach(report);
        }
    }

    return {
        FunctionDeclaration: checkForArguments,
        FunctionExpression: checkForArguments
    };
}

};

},{}],329:[function(require,module,exports){ /**

* @fileoverview A rule to suggest using of the spread operator instead of `.apply()`.
* @author Toru Nagashima
*/

“use strict”;

var astUtils = require(“../ast-utils”);

//—————————————————————————— // Helpers //——————————————————————————

/**

* Checks whether or not a node is a `.apply()` for variadic.
* @param {ASTNode} node - A CallExpression node to check.
* @returns {boolean} Whether or not the node is a `.apply()` for variadic.
*/

function isVariadicApplyCalling(node) {

return (
    node.callee.type === "MemberExpression" &&
    node.callee.property.type === "Identifier" &&
    node.callee.property.name === "apply" &&
    node.callee.computed === false &&
    node.arguments.length === 2 &&
    node.arguments[1].type !== "ArrayExpression"
);

}

/**

* Checks whether or not the tokens of two given nodes are same.
* @param {ASTNode} left - A node 1 to compare.
* @param {ASTNode} right - A node 2 to compare.
* @param {SourceCode} sourceCode - The ESLint source code object.
* @returns {boolean} the source code for the given node.
*/

function equalTokens(left, right, sourceCode) {

var tokensL = sourceCode.getTokens(left);
var tokensR = sourceCode.getTokens(right);

if (tokensL.length !== tokensR.length) {
    return false;
}
for (var i = 0; i < tokensL.length; ++i) {
    if (tokensL[i].type !== tokensR[i].type ||
        tokensL[i].value !== tokensR[i].value
    ) {
        return false;
    }
}

return true;

}

/**

* Checks whether or not `thisArg` is not changed by `.apply()`.
* @param {ASTNode|null} expectedThis - The node that is the owner of the applied function.
* @param {ASTNode} thisArg - The node that is given to the first argument of the `.apply()`.
* @param {RuleContext} context - The ESLint rule context object.
* @returns {boolean} Whether or not `thisArg` is not changed by `.apply()`.
*/

function isValidThisArg(expectedThis, thisArg, context) {

if (!expectedThis) {
    return astUtils.isNullOrUndefined(thisArg);
}
return equalTokens(expectedThis, thisArg, context);

}

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "require spread operators instead of `.apply()`",
        category: "ECMAScript 6",
        recommended: false
    },

    schema: []
},

create: function(context) {
    var sourceCode = context.getSourceCode();

    return {
        CallExpression: function(node) {
            if (!isVariadicApplyCalling(node)) {
                return;
            }

            var applied = node.callee.object;
            var expectedThis = (applied.type === "MemberExpression") ? applied.object : null;
            var thisArg = node.arguments[0];

            if (isValidThisArg(expectedThis, thisArg, sourceCode)) {
                context.report(node, "use the spread operator instead of the '.apply()'.");
            }
        }
    };
}

};

},{“../ast-utils”:124}],330:[function(require,module,exports){ /**

* @fileoverview A rule to suggest using template literals instead of string concatenation.
* @author Toru Nagashima
*/

“use strict”;

//—————————————————————————— // Requirements //——————————————————————————

var astUtils = require(“../ast-utils”);

//—————————————————————————— // Helpers //——————————————————————————

/**

* Checks whether or not a given node is a concatenation.
* @param {ASTNode} node - A node to check.
* @returns {boolean} `true` if the node is a concatenation.
*/

function isConcatenation(node) {

return node.type === "BinaryExpression" && node.operator === "+";

}

/**

* Gets the top binary expression node for concatenation in parents of a given node.
* @param {ASTNode} node - A node to get.
* @returns {ASTNode} the top binary expression node in parents of a given node.
*/

function getTopConcatBinaryExpression(node) {

while (isConcatenation(node.parent)) {
    node = node.parent;
}
return node;

}

/**

* Checks whether or not a given binary expression has non string literals.
* @param {ASTNode} node - A node to check.
* @returns {boolean} `true` if the node has non string literals.
*/

function hasNonStringLiteral(node) {

if (isConcatenation(node)) {

    // `left` is deeper than `right` normally.
    return hasNonStringLiteral(node.right) || hasNonStringLiteral(node.left);
}
return !astUtils.isStringLiteral(node);

}

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "require template literals instead of string concatenation",
        category: "ECMAScript 6",
        recommended: false
    },

    schema: []
},

create: function(context) {
    var done = Object.create(null);

    /**
     * Reports if a given node is string concatenation with non string literals.
     *
     * @param {ASTNode} node - A node to check.
     * @returns {void}
     */
    function checkForStringConcat(node) {
        if (!astUtils.isStringLiteral(node) || !isConcatenation(node.parent)) {
            return;
        }

        var topBinaryExpr = getTopConcatBinaryExpression(node.parent);

        // Checks whether or not this node had been checked already.
        if (done[topBinaryExpr.range[0]]) {
            return;
        }
        done[topBinaryExpr.range[0]] = true;

        if (hasNonStringLiteral(topBinaryExpr)) {
            context.report(
                topBinaryExpr,
                "Unexpected string concatenation.");
        }
    }

    return {
        Program: function() {
            done = Object.create(null);
        },

        Literal: checkForStringConcat,
        TemplateLiteral: checkForStringConcat
    };
}

};

},{“../ast-utils”:124}],331:[function(require,module,exports){ /**

* @fileoverview Rule to flag non-quoted property names in object literals.
* @author Mathias Bynens <http://mathiasbynens.be/>
*/

“use strict”;

//—————————————————————————— // Requirements //——————————————————————————

var espree = require(“espree”),

keywords = require("../util/keywords");

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "require quotes around object literal property names",
        category: "Stylistic Issues",
        recommended: false
    },

    schema: {
        anyOf: [
            {
                type: "array",
                items: [
                    {
                        enum: ["always", "as-needed", "consistent", "consistent-as-needed"]
                    }
                ],
                minItems: 0,
                maxItems: 1
            },
            {
                type: "array",
                items: [
                    {
                        enum: ["always", "as-needed", "consistent", "consistent-as-needed"]
                    },
                    {
                        type: "object",
                        properties: {
                            keywords: {
                                type: "boolean"
                            },
                            unnecessary: {
                                type: "boolean"
                            },
                            numbers: {
                                type: "boolean"
                            }
                        },
                        additionalProperties: false
                    }
                ],
                minItems: 0,
                maxItems: 2
            }
        ]
    }
},

create: function(context) {

    var MODE = context.options[0],
        KEYWORDS = context.options[1] && context.options[1].keywords,
        CHECK_UNNECESSARY = !context.options[1] || context.options[1].unnecessary !== false,
        NUMBERS = context.options[1] && context.options[1].numbers,

        MESSAGE_UNNECESSARY = "Unnecessarily quoted property '{{property}}' found.",
        MESSAGE_UNQUOTED = "Unquoted property '{{property}}' found.",
        MESSAGE_NUMERIC = "Unquoted number literal '{{property}}' used as key.",
        MESSAGE_RESERVED = "Unquoted reserved word '{{property}}' used as key.";

    /**
     * Checks whether a certain string constitutes an ES3 token
     * @param   {string} tokenStr - The string to be checked.
     * @returns {boolean} `true` if it is an ES3 token.
     */
    function isKeyword(tokenStr) {
        return keywords.indexOf(tokenStr) >= 0;
    }

    /**
     * Checks if an espree-tokenized key has redundant quotes (i.e. whether quotes are unnecessary)
     * @param   {string} rawKey The raw key value from the source
     * @param   {espreeTokens} tokens The espree-tokenized node key
     * @param   {boolean} [skipNumberLiterals=false] Indicates whether number literals should be checked
     * @returns {boolean} Whether or not a key has redundant quotes.
     * @private
     */
    function areQuotesRedundant(rawKey, tokens, skipNumberLiterals) {
        return tokens.length === 1 && tokens[0].start === 0 && tokens[0].end === rawKey.length &&
            (["Identifier", "Keyword", "Null", "Boolean"].indexOf(tokens[0].type) >= 0 ||
            (tokens[0].type === "Numeric" && !skipNumberLiterals && "" + +tokens[0].value === tokens[0].value));
    }

    /**
     * Ensures that a property's key is quoted only when necessary
     * @param   {ASTNode} node Property AST node
     * @returns {void}
     */
    function checkUnnecessaryQuotes(node) {
        var key = node.key,
            isKeywordToken,
            tokens;

        if (node.method || node.computed || node.shorthand) {
            return;
        }

        if (key.type === "Literal" && typeof key.value === "string") {
            try {
                tokens = espree.tokenize(key.value);
            } catch (e) {
                return;
            }

            if (tokens.length !== 1) {
                return;
            }

            isKeywordToken = isKeyword(tokens[0].value);

            if (isKeywordToken && KEYWORDS) {
                return;
            }

            if (CHECK_UNNECESSARY && areQuotesRedundant(key.value, tokens, NUMBERS)) {
                context.report(node, MESSAGE_UNNECESSARY, {property: key.value});
            }
        } else if (KEYWORDS && key.type === "Identifier" && isKeyword(key.name)) {
            context.report(node, MESSAGE_RESERVED, {property: key.name});
        } else if (NUMBERS && key.type === "Literal" && typeof key.value === "number") {
            context.report(node, MESSAGE_NUMERIC, {property: key.value});
        }
    }

    /**
     * Ensures that a property's key is quoted
     * @param   {ASTNode} node Property AST node
     * @returns {void}
     */
    function checkOmittedQuotes(node) {
        var key = node.key;

        if (!node.method && !node.computed && !node.shorthand && !(key.type === "Literal" && typeof key.value === "string")) {
            context.report(node, MESSAGE_UNQUOTED, {
                property: key.name || key.value
            });
        }
    }

    /**
     * Ensures that an object's keys are consistently quoted, optionally checks for redundancy of quotes
     * @param   {ASTNode} node Property AST node
     * @param   {boolean} checkQuotesRedundancy Whether to check quotes' redundancy
     * @returns {void}
     */
    function checkConsistency(node, checkQuotesRedundancy) {
        var quotes = false,
            lackOfQuotes = false,
            necessaryQuotes = false;

        node.properties.forEach(function(property) {
            var key = property.key,
                tokens;

            if (!key || property.method || property.computed || property.shorthand) {
                return;
            }

            if (key.type === "Literal" && typeof key.value === "string") {

                quotes = true;

                if (checkQuotesRedundancy) {
                    try {
                        tokens = espree.tokenize(key.value);
                    } catch (e) {
                        necessaryQuotes = true;
                        return;
                    }

                    necessaryQuotes = necessaryQuotes || !areQuotesRedundant(key.value, tokens) || KEYWORDS && isKeyword(tokens[0].value);
                }
            } else if (KEYWORDS && checkQuotesRedundancy && key.type === "Identifier" && isKeyword(key.name)) {
                necessaryQuotes = true;
                context.report(node, "Properties should be quoted as '{{property}}' is a reserved word.", {property: key.name});
            } else {
                lackOfQuotes = true;
            }

            if (quotes && lackOfQuotes) {
                context.report(node, "Inconsistently quoted property '{{key}}' found.", {
                    key: key.name || key.value
                });
            }
        });

        if (checkQuotesRedundancy && quotes && !necessaryQuotes) {
            context.report(node, "Properties shouldn't be quoted as all quotes are redundant.");
        }
    }

    return {
        Property: function(node) {
            if (MODE === "always" || !MODE) {
                checkOmittedQuotes(node);
            }
            if (MODE === "as-needed") {
                checkUnnecessaryQuotes(node);
            }
        },
        ObjectExpression: function(node) {
            if (MODE === "consistent") {
                checkConsistency(node, false);
            }
            if (MODE === "consistent-as-needed") {
                checkConsistency(node, true);
            }
        }
    };

}

};

},{“../util/keywords”:361,“espree”:“espree”}],332:[function(require,module,exports){ /**

* @fileoverview A rule to choose between single and double quote marks
* @author Matt DuVall <http://www.mattduvall.com/>, Brandon Payton
*/

“use strict”;

//—————————————————————————— // Requirements //——————————————————————————

var astUtils = require(“../ast-utils”);

//—————————————————————————— // Constants //——————————————————————————

var QUOTE_SETTINGS = {

double: {
    quote: "\"",
    alternateQuote: "'",
    description: "doublequote"
},
single: {
    quote: "'",
    alternateQuote: "\"",
    description: "singlequote"
},
backtick: {
    quote: "`",
    alternateQuote: "\"",
    description: "backtick"
}

};

/**

* Switches quoting of javascript string between ' " and `
* escaping and unescaping as necessary.
* Only escaping of the minimal set of characters is changed.
* Note: escaping of newlines when switching from backtick to other quotes is not handled.
* @param {string} str - A string to convert.
* @returns {string} The string with changed quotes.
* @private
*/

QUOTE_SETTINGS.double.convert = QUOTE_SETTINGS.single.convert = QUOTE_SETTINGS.backtick.convert = function(str) {

var newQuote = this.quote;
var oldQuote = str[0];

if (newQuote === oldQuote) {
    return str;
}
return newQuote + str.slice(1, -1).replace(/\\(\${|\r\n?|\n|.)|["'`]|\${|(\r\n?|\n)/g, function(match, escaped, newline) {
    if (escaped === oldQuote || oldQuote === "`" && escaped === "${") {
        return escaped; // unescape
    }
    if (match === newQuote || newQuote === "`" && match === "${") {
        return "\\" + match; // escape
    }
    if (newline && oldQuote === "`") {
        return "\\n"; // escape newlines
    }
    return match;
}) + newQuote;

};

var AVOID_ESCAPE = “avoid-escape”,

FUNCTION_TYPE = /^(?:Arrow)?Function(?:Declaration|Expression)$/;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "enforce the consistent use of either backticks, double, or single quotes",
        category: "Stylistic Issues",
        recommended: false
    },

    fixable: "code",

    schema: [
        {
            enum: ["single", "double", "backtick"]
        },
        {
            anyOf: [
                {
                    enum: ["avoid-escape"]
                },
                {
                    type: "object",
                    properties: {
                        avoidEscape: {
                            type: "boolean"
                        },
                        allowTemplateLiterals: {
                            type: "boolean"
                        }
                    },
                    additionalProperties: false
                }
            ]
        }
    ]
},

create: function(context) {

    var quoteOption = context.options[0],
        settings = QUOTE_SETTINGS[quoteOption || "double"],
        options = context.options[1],
        avoidEscape = options && options.avoidEscape === true,
        allowTemplateLiterals = options && options.allowTemplateLiterals === true,
        sourceCode = context.getSourceCode();

    // deprecated
    if (options === AVOID_ESCAPE) {
        avoidEscape = true;
    }

    /**
     * Determines if a given node is part of JSX syntax.
     * @param {ASTNode} node The node to check.
     * @returns {boolean} True if the node is a JSX node, false if not.
     * @private
     */
    function isJSXElement(node) {
        return node.type.indexOf("JSX") === 0;
    }

    /**
     * Checks whether or not a given node is a directive.
     * The directive is a `ExpressionStatement` which has only a string literal.
     * @param {ASTNode} node - A node to check.
     * @returns {boolean} Whether or not the node is a directive.
     * @private
     */
    function isDirective(node) {
        return (
            node.type === "ExpressionStatement" &&
            node.expression.type === "Literal" &&
            typeof node.expression.value === "string"
        );
    }

    /**
     * Checks whether or not a given node is a part of directive prologues.
     * See also: http://www.ecma-international.org/ecma-262/6.0/#sec-directive-prologues-and-the-use-strict-directive
     * @param {ASTNode} node - A node to check.
     * @returns {boolean} Whether or not the node is a part of directive prologues.
     * @private
     */
    function isPartOfDirectivePrologue(node) {
        var block = node.parent.parent;

        if (block.type !== "Program" && (block.type !== "BlockStatement" || !FUNCTION_TYPE.test(block.parent.type))) {
            return false;
        }

        // Check the node is at a prologue.
        for (var i = 0; i < block.body.length; ++i) {
            var statement = block.body[i];

            if (statement === node.parent) {
                return true;
            }
            if (!isDirective(statement)) {
                break;
            }
        }

        return false;
    }

    /**
     * Checks whether or not a given node is allowed as non backtick.
     * @param {ASTNode} node - A node to check.
     * @returns {boolean} Whether or not the node is allowed as non backtick.
     * @private
     */
    function isAllowedAsNonBacktick(node) {
        var parent = node.parent;

        switch (parent.type) {

            // Directive Prologues.
            case "ExpressionStatement":
                return isPartOfDirectivePrologue(node);

            // LiteralPropertyName.
            case "Property":
                return parent.key === node && !parent.computed;

            // ModuleSpecifier.
            case "ImportDeclaration":
            case "ExportNamedDeclaration":
            case "ExportAllDeclaration":
                return parent.source === node;

            // Others don't allow.
            default:
                return false;
        }
    }

    return {

        Literal: function(node) {
            var val = node.value,
                rawVal = node.raw,
                isValid;

            if (settings && typeof val === "string") {
                isValid = (quoteOption === "backtick" && isAllowedAsNonBacktick(node)) ||
                    isJSXElement(node.parent) ||
                    astUtils.isSurroundedBy(rawVal, settings.quote);

                if (!isValid && avoidEscape) {
                    isValid = astUtils.isSurroundedBy(rawVal, settings.alternateQuote) && rawVal.indexOf(settings.quote) >= 0;
                }

                if (!isValid) {
                    context.report({
                        node: node,
                        message: "Strings must use " + settings.description + ".",
                        fix: function(fixer) {
                            return fixer.replaceText(node, settings.convert(node.raw));
                        }
                    });
                }
            }
        },

        TemplateLiteral: function(node) {

            // If backticks are expected or it's a tagged template, then this shouldn't throw an errors
            if (allowTemplateLiterals || quoteOption === "backtick" || node.parent.type === "TaggedTemplateExpression") {
                return;
            }

            var shouldWarn = node.quasis.length === 1 && (node.quasis[0].value.cooked.indexOf("\n") === -1);

            if (shouldWarn) {
                context.report({
                    node: node,
                    message: "Strings must use " + settings.description + ".",
                    fix: function(fixer) {
                        return fixer.replaceText(node, settings.convert(sourceCode.getText(node)));
                    }
                });
            }
        }
    };

}

};

},{“../ast-utils”:124}],333:[function(require,module,exports){ /**

* @fileoverview Rule to flag use of parseInt without a radix argument
* @author James Allardice
*/

“use strict”;

//—————————————————————————— // Requirements //——————————————————————————

var astUtils = require(“../ast-utils”);

//—————————————————————————— // Helpers //——————————————————————————

var MODE_ALWAYS = “always”,

MODE_AS_NEEDED = "as-needed";

/**

* Checks whether a given variable is shadowed or not.
*
* @param {escope.Variable} variable - A variable to check.
* @returns {boolean} `true` if the variable is shadowed.
*/

function isShadowed(variable) {

return variable.defs.length >= 1;

}

/**

* Checks whether a given node is a MemberExpression of `parseInt` method or not.
*
* @param {ASTNode} node - A node to check.
* @returns {boolean} `true` if the node is a MemberExpression of `parseInt`
*      method.
*/

function isParseIntMethod(node) {

return (
    node.type === "MemberExpression" &&
    !node.computed &&
    node.property.type === "Identifier" &&
    node.property.name === "parseInt"
);

}

/**

* Checks whether a given node is a valid value of radix or not.
*
* The following values are invalid.
*
* - A literal except numbers.
* - undefined.
*
* @param {ASTNode} radix - A node of radix to check.
* @returns {boolean} `true` if the node is valid.
*/

function isValidRadix(radix) {

return !(
    (radix.type === "Literal" && typeof radix.value !== "number") ||
    (radix.type === "Identifier" && radix.name === "undefined")
);

}

/**

* Checks whether a given node is a default value of radix or not.
*
* @param {ASTNode} radix - A node of radix to check.
* @returns {boolean} `true` if the node is the literal node of `10`.
*/

function isDefaultRadix(radix) {

return radix.type === "Literal" && radix.value === 10;

}

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "enforce the consistent use of the radix argument when using `parseInt()`",
        category: "Best Practices",
        recommended: false
    },

    schema: [
        {
            enum: ["always", "as-needed"]
        }
    ]
},

create: function(context) {
    var mode = context.options[0] || MODE_ALWAYS;

    /**
     * Checks the arguments of a given CallExpression node and reports it if it
     * offends this rule.
     *
     * @param {ASTNode} node - A CallExpression node to check.
     * @returns {void}
     */
    function checkArguments(node) {
        var args = node.arguments;

        switch (args.length) {
            case 0:
                context.report({
                    node: node,
                    message: "Missing parameters."
                });
                break;

            case 1:
                if (mode === MODE_ALWAYS) {
                    context.report({
                        node: node,
                        message: "Missing radix parameter."
                    });
                }
                break;

            default:
                if (mode === MODE_AS_NEEDED && isDefaultRadix(args[1])) {
                    context.report({
                        node: node,
                        message: "Redundant radix parameter."
                    });
                } else if (!isValidRadix(args[1])) {
                    context.report({
                        node: node,
                        message: "Invalid radix parameter."
                    });
                }
                break;
        }
    }

    return {
        "Program:exit": function() {
            var scope = context.getScope();
            var variable;

            // Check `parseInt()`
            variable = astUtils.getVariableByName(scope, "parseInt");
            if (!isShadowed(variable)) {
                variable.references.forEach(function(reference) {
                    var node = reference.identifier;

                    if (astUtils.isCallee(node)) {
                        checkArguments(node.parent);
                    }
                });
            }

            // Check `Number.parseInt()`
            variable = astUtils.getVariableByName(scope, "Number");
            if (!isShadowed(variable)) {
                variable.references.forEach(function(reference) {
                    var node = reference.identifier.parent;

                    if (isParseIntMethod(node) && astUtils.isCallee(node)) {
                        checkArguments(node.parent);
                    }
                });
            }
        }
    };
}

};

},{“../ast-utils”:124}],334:[function(require,module,exports){ /**

* @fileoverview Rule to check for jsdoc presence.
* @author Gyandeep Singh
*/

“use strict”;

var lodash = require(“lodash”);

module.exports = {

meta: {
    docs: {
        description: "require JSDoc comments",
        category: "Stylistic Issues",
        recommended: false
    },

    schema: [
        {
            type: "object",
            properties: {
                require: {
                    type: "object",
                    properties: {
                        ClassDeclaration: {
                            type: "boolean"
                        },
                        MethodDefinition: {
                            type: "boolean"
                        },
                        FunctionDeclaration: {
                            type: "boolean"
                        }
                    },
                    additionalProperties: false
                }
            },
            additionalProperties: false
        }
    ]
},

create: function(context) {
    var source = context.getSourceCode();
    var DEFAULT_OPTIONS = {
        FunctionDeclaration: true,
        MethodDefinition: false,
        ClassDeclaration: false
    };
    var options = lodash.assign(DEFAULT_OPTIONS, context.options[0] && context.options[0].require || {});

    /**
     * Report the error message
     * @param {ASTNode} node node to report
     * @returns {void}
     */
    function report(node) {
        context.report(node, "Missing JSDoc comment.");
    }

    /**
     * Check if the jsdoc comment is present for class methods
     * @param {ASTNode} node node to examine
     * @returns {void}
     */
    function checkClassMethodJsDoc(node) {
        if (node.parent.type === "MethodDefinition") {
            var jsdocComment = source.getJSDocComment(node);

            if (!jsdocComment) {
                report(node);
            }
        }
    }

    /**
     * Check if the jsdoc comment is present or not.
     * @param {ASTNode} node node to examine
     * @returns {void}
     */
    function checkJsDoc(node) {
        var jsdocComment = source.getJSDocComment(node);

        if (!jsdocComment) {
            report(node);
        }
    }

    return {
        FunctionDeclaration: function(node) {
            if (options.FunctionDeclaration) {
                checkJsDoc(node);
            }
        },
        FunctionExpression: function(node) {
            if (options.MethodDefinition) {
                checkClassMethodJsDoc(node);
            }
        },
        ClassDeclaration: function(node) {
            if (options.ClassDeclaration) {
                checkJsDoc(node);
            }
        }
    };
}

};

},{“lodash”:108}],335:[function(require,module,exports){ /**

* @fileoverview Rule to flag the generator functions that does not have yield.
* @author Toru Nagashima
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "require generator functions to contain `yield`",
        category: "ECMAScript 6",
        recommended: false
    },

    schema: []
},

create: function(context) {
    var stack = [];

    /**
     * If the node is a generator function, start counting `yield` keywords.
     * @param {Node} node - A function node to check.
     * @returns {void}
     */
    function beginChecking(node) {
        if (node.generator) {
            stack.push(0);
        }
    }

    /**
     * If the node is a generator function, end counting `yield` keywords, then
     * reports result.
     * @param {Node} node - A function node to check.
     * @returns {void}
     */
    function endChecking(node) {
        if (!node.generator) {
            return;
        }

        var countYield = stack.pop();

        if (countYield === 0 && node.body.body.length > 0) {
            context.report(
                node,
                "This generator function does not have 'yield'.");
        }
    }

    return {
        FunctionDeclaration: beginChecking,
        "FunctionDeclaration:exit": endChecking,
        FunctionExpression: beginChecking,
        "FunctionExpression:exit": endChecking,

        // Increases the count of `yield` keyword.
        YieldExpression: function() {

            /* istanbul ignore else */
            if (stack.length > 0) {
                stack[stack.length - 1] += 1;
            }
        }
    };
}

};

},{}],336:[function(require,module,exports){ /**

* @fileoverview Enforce spacing between rest and spread operators and their expressions.
* @author Kai Cataldo
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "enforce spacing between rest and spread operators and their expressions",
        category: "ECMAScript 6",
        recommended: false
    },
    fixable: "whitespace",
    schema: [
        {
            enum: ["always", "never"]
        }
    ]
},

create: function(context) {
    var sourceCode = context.getSourceCode(),
        alwaysSpace = context.options[0] === "always";

    //--------------------------------------------------------------------------
    // Helpers
    //--------------------------------------------------------------------------

    /**
     * Checks whitespace between rest/spread operators and their expressions
     * @param {ASTNode} node - The node to check
     * @returns {void}
     */
    function checkWhiteSpace(node) {
        var operator = sourceCode.getFirstToken(node),
            nextToken = sourceCode.getTokenAfter(operator),
            hasWhitespace = sourceCode.isSpaceBetweenTokens(operator, nextToken),
            type;

        switch (node.type) {
            case "SpreadElement":
                type = "spread";
                break;
            case "RestElement":
                type = "rest";
                break;
            case "ExperimentalSpreadProperty":
                type = "spread property";
                break;
            case "ExperimentalRestProperty":
                type = "rest property";
                break;
            default:
                return;
        }

        if (alwaysSpace && !hasWhitespace) {
            context.report({
                node: node,
                loc: {
                    line: operator.loc.end.line,
                    column: operator.loc.end.column
                },
                message: "Expected whitespace after {{type}} operator",
                data: {
                    type: type
                },
                fix: function(fixer) {
                    return fixer.replaceTextRange([operator.range[1], nextToken.range[0]], " ");
                }
            });
        } else if (!alwaysSpace && hasWhitespace) {
            context.report({
                node: node,
                loc: {
                    line: operator.loc.end.line,
                    column: operator.loc.end.column
                },
                message: "Unexpected whitespace after {{type}} operator",
                data: {
                    type: type
                },
                fix: function(fixer) {
                    return fixer.removeRange([operator.range[1], nextToken.range[0]]);
                }
            });
        }
    }

    //--------------------------------------------------------------------------
    // Public
    //--------------------------------------------------------------------------

    return {
        SpreadElement: checkWhiteSpace,
        RestElement: checkWhiteSpace,
        ExperimentalSpreadProperty: checkWhiteSpace,
        ExperimentalRestProperty: checkWhiteSpace
    };
}

};

},{}],337:[function(require,module,exports){ /**

* @fileoverview Validates spacing before and after semicolon
* @author Mathias Schreck
*/

“use strict”;

var astUtils = require(“../ast-utils”);

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "enforce consistent spacing before and after semicolons",
        category: "Stylistic Issues",
        recommended: false
    },

    fixable: "whitespace",

    schema: [
        {
            type: "object",
            properties: {
                before: {
                    type: "boolean"
                },
                after: {
                    type: "boolean"
                }
            },
            additionalProperties: false
        }
    ]
},

create: function(context) {

    var config = context.options[0],
        requireSpaceBefore = false,
        requireSpaceAfter = true,
        sourceCode = context.getSourceCode();

    if (typeof config === "object") {
        if (config.hasOwnProperty("before")) {
            requireSpaceBefore = config.before;
        }
        if (config.hasOwnProperty("after")) {
            requireSpaceAfter = config.after;
        }
    }

    /**
     * Checks if a given token has leading whitespace.
     * @param {Object} token The token to check.
     * @returns {boolean} True if the given token has leading space, false if not.
     */
    function hasLeadingSpace(token) {
        var tokenBefore = sourceCode.getTokenBefore(token);

        return tokenBefore && astUtils.isTokenOnSameLine(tokenBefore, token) && sourceCode.isSpaceBetweenTokens(tokenBefore, token);
    }

    /**
     * Checks if a given token has trailing whitespace.
     * @param {Object} token The token to check.
     * @returns {boolean} True if the given token has trailing space, false if not.
     */
    function hasTrailingSpace(token) {
        var tokenAfter = sourceCode.getTokenAfter(token);

        return tokenAfter && astUtils.isTokenOnSameLine(token, tokenAfter) && sourceCode.isSpaceBetweenTokens(token, tokenAfter);
    }

    /**
     * Checks if the given token is the last token in its line.
     * @param {Token} token The token to check.
     * @returns {boolean} Whether or not the token is the last in its line.
     */
    function isLastTokenInCurrentLine(token) {
        var tokenAfter = sourceCode.getTokenAfter(token);

        return !(tokenAfter && astUtils.isTokenOnSameLine(token, tokenAfter));
    }

    /**
     * Checks if the given token is the first token in its line
     * @param {Token} token The token to check.
     * @returns {boolean} Whether or not the token is the first in its line.
     */
    function isFirstTokenInCurrentLine(token) {
        var tokenBefore = sourceCode.getTokenBefore(token);

        return !(tokenBefore && astUtils.isTokenOnSameLine(token, tokenBefore));
    }

    /**
     * Checks if the next token of a given token is a closing parenthesis.
     * @param {Token} token The token to check.
     * @returns {boolean} Whether or not the next token of a given token is a closing parenthesis.
     */
    function isBeforeClosingParen(token) {
        var nextToken = sourceCode.getTokenAfter(token);

        return (
            nextToken &&
            nextToken.type === "Punctuator" &&
            (nextToken.value === "}" || nextToken.value === ")")
        );
    }

    /**
     * Checks if the given token is a semicolon.
     * @param {Token} token The token to check.
     * @returns {boolean} Whether or not the given token is a semicolon.
     */
    function isSemicolon(token) {
        return token.type === "Punctuator" && token.value === ";";
    }

    /**
     * Reports if the given token has invalid spacing.
     * @param {Token} token The semicolon token to check.
     * @param {ASTNode} node The corresponding node of the token.
     * @returns {void}
     */
    function checkSemicolonSpacing(token, node) {
        var location;

        if (isSemicolon(token)) {
            location = token.loc.start;

            if (hasLeadingSpace(token)) {
                if (!requireSpaceBefore) {
                    context.report({
                        node: node,
                        loc: location,
                        message: "Unexpected whitespace before semicolon.",
                        fix: function(fixer) {
                            var tokenBefore = sourceCode.getTokenBefore(token);

                            return fixer.removeRange([tokenBefore.range[1], token.range[0]]);
                        }
                    });
                }
            } else {
                if (requireSpaceBefore) {
                    context.report({
                        node: node,
                        loc: location,
                        message: "Missing whitespace before semicolon.",
                        fix: function(fixer) {
                            return fixer.insertTextBefore(token, " ");
                        }
                    });
                }
            }

            if (!isFirstTokenInCurrentLine(token) && !isLastTokenInCurrentLine(token) && !isBeforeClosingParen(token)) {
                if (hasTrailingSpace(token)) {
                    if (!requireSpaceAfter) {
                        context.report({
                            node: node,
                            loc: location,
                            message: "Unexpected whitespace after semicolon.",
                            fix: function(fixer) {
                                var tokenAfter = sourceCode.getTokenAfter(token);

                                return fixer.removeRange([token.range[1], tokenAfter.range[0]]);
                            }
                        });
                    }
                } else {
                    if (requireSpaceAfter) {
                        context.report({
                            node: node,
                            loc: location,
                            message: "Missing whitespace after semicolon.",
                            fix: function(fixer) {
                                return fixer.insertTextAfter(token, " ");
                            }
                        });
                    }
                }
            }
        }
    }

    /**
     * Checks the spacing of the semicolon with the assumption that the last token is the semicolon.
     * @param {ASTNode} node The node to check.
     * @returns {void}
     */
    function checkNode(node) {
        var token = sourceCode.getLastToken(node);

        checkSemicolonSpacing(token, node);
    }

    return {
        VariableDeclaration: checkNode,
        ExpressionStatement: checkNode,
        BreakStatement: checkNode,
        ContinueStatement: checkNode,
        DebuggerStatement: checkNode,
        ReturnStatement: checkNode,
        ThrowStatement: checkNode,
        ForStatement: function(node) {
            if (node.init) {
                checkSemicolonSpacing(sourceCode.getTokenAfter(node.init), node);
            }

            if (node.test) {
                checkSemicolonSpacing(sourceCode.getTokenAfter(node.test), node);
            }
        }
    };
}

};

},{“../ast-utils”:124}],338:[function(require,module,exports){ /**

* @fileoverview Rule to flag missing semicolons.
* @author Nicholas C. Zakas
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "require or disallow semicolons instead of ASI",
        category: "Stylistic Issues",
        recommended: false
    },

    fixable: "code",

    schema: {
        anyOf: [
            {
                type: "array",
                items: [
                    {
                        enum: ["never"]
                    }
                ],
                minItems: 0,
                maxItems: 1
            },
            {
                type: "array",
                items: [
                    {
                        enum: ["always"]
                    },
                    {
                        type: "object",
                        properties: {
                            omitLastInOneLineBlock: {type: "boolean"}
                        },
                        additionalProperties: false
                    }
                ],
                minItems: 0,
                maxItems: 2
            }
        ]
    }
},

create: function(context) {

    var OPT_OUT_PATTERN = /[\[\(\/\+\-]/; // One of [(/+-
    var options = context.options[1];
    var never = context.options[0] === "never",
        exceptOneLine = options && options.omitLastInOneLineBlock === true,
        sourceCode = context.getSourceCode();

    //--------------------------------------------------------------------------
    // Helpers
    //--------------------------------------------------------------------------

    /**
     * Reports a semicolon error with appropriate location and message.
     * @param {ASTNode} node The node with an extra or missing semicolon.
     * @param {boolean} missing True if the semicolon is missing.
     * @returns {void}
     */
    function report(node, missing) {
        var message,
            fix,
            lastToken = sourceCode.getLastToken(node),
            loc = lastToken.loc;

        if (!missing) {
            message = "Missing semicolon.";
            loc = loc.end;
            fix = function(fixer) {
                return fixer.insertTextAfter(lastToken, ";");
            };
        } else {
            message = "Extra semicolon.";
            loc = loc.start;
            fix = function(fixer) {
                return fixer.remove(lastToken);
            };
        }

        context.report({
            node: node,
            loc: loc,
            message: message,
            fix: fix
        });

    }

    /**
     * Checks whether a token is a semicolon punctuator.
     * @param {Token} token The token.
     * @returns {boolean} True if token is a semicolon punctuator.
     */
    function isSemicolon(token) {
        return (token.type === "Punctuator" && token.value === ";");
    }

    /**
     * Check if a semicolon is unnecessary, only true if:
     *   - next token is on a new line and is not one of the opt-out tokens
     *   - next token is a valid statement divider
     * @param {Token} lastToken last token of current node.
     * @returns {boolean} whether the semicolon is unnecessary.
     */
    function isUnnecessarySemicolon(lastToken) {
        var isDivider, isOptOutToken, lastTokenLine, nextToken, nextTokenLine;

        if (!isSemicolon(lastToken)) {
            return false;
        }

        nextToken = sourceCode.getTokenAfter(lastToken);

        if (!nextToken) {
            return true;
        }

        lastTokenLine = lastToken.loc.end.line;
        nextTokenLine = nextToken.loc.start.line;
        isOptOutToken = OPT_OUT_PATTERN.test(nextToken.value);
        isDivider = (nextToken.value === "}" || nextToken.value === ";");

        return (lastTokenLine !== nextTokenLine && !isOptOutToken) || isDivider;
    }

    /**
     * Checks a node to see if it's in a one-liner block statement.
     * @param {ASTNode} node The node to check.
     * @returns {boolean} whether the node is in a one-liner block statement.
     */
    function isOneLinerBlock(node) {
        var nextToken = sourceCode.getTokenAfter(node);

        if (!nextToken || nextToken.value !== "}") {
            return false;
        }

        var parent = node.parent;

        return parent && parent.type === "BlockStatement" &&
          parent.loc.start.line === parent.loc.end.line;
    }

    /**
     * Checks a node to see if it's followed by a semicolon.
     * @param {ASTNode} node The node to check.
     * @returns {void}
     */
    function checkForSemicolon(node) {
        var lastToken = sourceCode.getLastToken(node);

        if (never) {
            if (isUnnecessarySemicolon(lastToken)) {
                report(node, true);
            }
        } else {
            if (!isSemicolon(lastToken)) {
                if (!exceptOneLine || !isOneLinerBlock(node)) {
                    report(node);
                }
            } else {
                if (exceptOneLine && isOneLinerBlock(node)) {
                    report(node, true);
                }
            }
        }
    }

    /**
     * Checks to see if there's a semicolon after a variable declaration.
     * @param {ASTNode} node The node to check.
     * @returns {void}
     */
    function checkForSemicolonForVariableDeclaration(node) {
        var ancestors = context.getAncestors(),
            parentIndex = ancestors.length - 1,
            parent = ancestors[parentIndex];

        if ((parent.type !== "ForStatement" || parent.init !== node) &&
            (!/^For(?:In|Of)Statement/.test(parent.type) || parent.left !== node)
        ) {
            checkForSemicolon(node);
        }
    }

    //--------------------------------------------------------------------------
    // Public API
    //--------------------------------------------------------------------------

    return {
        VariableDeclaration: checkForSemicolonForVariableDeclaration,
        ExpressionStatement: checkForSemicolon,
        ReturnStatement: checkForSemicolon,
        ThrowStatement: checkForSemicolon,
        DoWhileStatement: checkForSemicolon,
        DebuggerStatement: checkForSemicolon,
        BreakStatement: checkForSemicolon,
        ContinueStatement: checkForSemicolon,
        ImportDeclaration: checkForSemicolon,
        ExportAllDeclaration: checkForSemicolon,
        ExportNamedDeclaration: function(node) {
            if (!node.declaration) {
                checkForSemicolon(node);
            }
        },
        ExportDefaultDeclaration: function(node) {
            if (!/(?:Class|Function)Declaration/.test(node.declaration.type)) {
                checkForSemicolon(node);
            }
        }
    };

}

};

},{}],339:[function(require,module,exports){ /**

* @fileoverview Rule to require sorting of import declarations
* @author Christian Schuller
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "enforce sorted import declarations within modules",
        category: "ECMAScript 6",
        recommended: false
    },

    schema: [
        {
            type: "object",
            properties: {
                ignoreCase: {
                    type: "boolean"
                },
                memberSyntaxSortOrder: {
                    type: "array",
                    items: {
                        enum: ["none", "all", "multiple", "single"]
                    },
                    uniqueItems: true,
                    minItems: 4,
                    maxItems: 4
                },
                ignoreMemberSort: {
                    type: "boolean"
                }
            },
            additionalProperties: false
        }
    ]
},

create: function(context) {

    var configuration = context.options[0] || {},
        ignoreCase = configuration.ignoreCase || false,
        ignoreMemberSort = configuration.ignoreMemberSort || false,
        memberSyntaxSortOrder = configuration.memberSyntaxSortOrder || ["none", "all", "multiple", "single"],
        previousDeclaration = null;

    /**
     * Gets the used member syntax style.
     *
     * import "my-module.js" --> none
     * import * as myModule from "my-module.js" --> all
     * import {myMember} from "my-module.js" --> single
     * import {foo, bar} from  "my-module.js" --> multiple
     *
     * @param {ASTNode} node - the ImportDeclaration node.
     * @returns {string} used member parameter style, ["all", "multiple", "single"]
     */
    function usedMemberSyntax(node) {
        if (node.specifiers.length === 0) {
            return "none";
        } else if (node.specifiers[0].type === "ImportNamespaceSpecifier") {
            return "all";
        } else if (node.specifiers.length === 1) {
            return "single";
        } else {
            return "multiple";
        }
    }

    /**
     * Gets the group by member parameter index for given declaration.
     * @param {ASTNode} node - the ImportDeclaration node.
     * @returns {number} the declaration group by member index.
     */
    function getMemberParameterGroupIndex(node) {
        return memberSyntaxSortOrder.indexOf(usedMemberSyntax(node));
    }

    /**
     * Gets the local name of the first imported module.
     * @param {ASTNode} node - the ImportDeclaration node.
     * @returns {?string} the local name of the first imported module.
     */
    function getFirstLocalMemberName(node) {
        if (node.specifiers[0]) {
            return node.specifiers[0].local.name;
        } else {
            return null;
        }
    }

    return {
        ImportDeclaration: function(node) {
            if (previousDeclaration) {
                var currentLocalMemberName = getFirstLocalMemberName(node),
                    currentMemberSyntaxGroupIndex = getMemberParameterGroupIndex(node),
                    previousLocalMemberName = getFirstLocalMemberName(previousDeclaration),
                    previousMemberSyntaxGroupIndex = getMemberParameterGroupIndex(previousDeclaration);

                if (ignoreCase) {
                    previousLocalMemberName = previousLocalMemberName && previousLocalMemberName.toLowerCase();
                    currentLocalMemberName = currentLocalMemberName && currentLocalMemberName.toLowerCase();
                }

                // When the current declaration uses a different member syntax,
                // then check if the ordering is correct.
                // Otherwise, make a default string compare (like rule sort-vars to be consistent) of the first used local member name.
                if (currentMemberSyntaxGroupIndex !== previousMemberSyntaxGroupIndex) {
                    if (currentMemberSyntaxGroupIndex < previousMemberSyntaxGroupIndex) {
                        context.report({
                            node: node,
                            message: "Expected '{{syntaxA}}' syntax before '{{syntaxB}}' syntax.",
                            data: {
                                syntaxA: memberSyntaxSortOrder[currentMemberSyntaxGroupIndex],
                                syntaxB: memberSyntaxSortOrder[previousMemberSyntaxGroupIndex]
                            }
                        });
                    }
                } else {
                    if (previousLocalMemberName &&
                        currentLocalMemberName &&
                        currentLocalMemberName < previousLocalMemberName
                    ) {
                        context.report({
                            node: node,
                            message: "Imports should be sorted alphabetically."
                        });
                    }
                }
            }

            // Multiple members of an import declaration should also be sorted alphabetically.
            if (!ignoreMemberSort && node.specifiers.length > 1) {
                var previousSpecifier = null;
                var previousSpecifierName = null;

                for (var i = 0; i < node.specifiers.length; ++i) {
                    var currentSpecifier = node.specifiers[i];

                    if (currentSpecifier.type !== "ImportSpecifier") {
                        continue;
                    }

                    var currentSpecifierName = currentSpecifier.local.name;

                    if (ignoreCase) {
                        currentSpecifierName = currentSpecifierName.toLowerCase();
                    }

                    if (previousSpecifier && currentSpecifierName < previousSpecifierName) {
                        context.report({
                            node: currentSpecifier,
                            message: "Member '{{memberName}}' of the import declaration should be sorted alphabetically.",
                            data: {
                                memberName: currentSpecifier.local.name
                            }
                        });
                    }

                    previousSpecifier = currentSpecifier;
                    previousSpecifierName = currentSpecifierName;
                }
            }

            previousDeclaration = node;
        }
    };
}

};

},{}],340:[function(require,module,exports){ /**

* @fileoverview Rule to require sorting of variables within a single Variable Declaration block
* @author Ilya Volodin
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "require variables within the same declaration block to be sorted",
        category: "Stylistic Issues",
        recommended: false
    },

    schema: [
        {
            type: "object",
            properties: {
                ignoreCase: {
                    type: "boolean"
                }
            },
            additionalProperties: false
        }
    ]
},

create: function(context) {

    var configuration = context.options[0] || {},
        ignoreCase = configuration.ignoreCase || false;

    return {
        VariableDeclaration: function(node) {
            node.declarations.reduce(function(memo, decl) {
                if (decl.id.type === "ObjectPattern" || decl.id.type === "ArrayPattern") {
                    return memo;
                }

                var lastVariableName = memo.id.name,
                    currenVariableName = decl.id.name;

                if (ignoreCase) {
                    lastVariableName = lastVariableName.toLowerCase();
                    currenVariableName = currenVariableName.toLowerCase();
                }

                if (currenVariableName < lastVariableName) {
                    context.report(decl, "Variables within the same declaration block should be sorted alphabetically");
                    return memo;
                } else {
                    return decl;
                }
            }, node.declarations[0]);
        }
    };
}

};

},{}],341:[function(require,module,exports){ /**

* @fileoverview A rule to ensure whitespace before blocks.
* @author Mathias Schreck <https://github.com/lo1tuma>
*/

“use strict”;

var astUtils = require(“../ast-utils”);

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "enforce consistent spacing before blocks",
        category: "Stylistic Issues",
        recommended: false
    },

    fixable: "whitespace",

    schema: [
        {
            oneOf: [
                {
                    enum: ["always", "never"]
                },
                {
                    type: "object",
                    properties: {
                        keywords: {
                            enum: ["always", "never"]
                        },
                        functions: {
                            enum: ["always", "never"]
                        },
                        classes: {
                            enum: ["always", "never"]
                        }
                    },
                    additionalProperties: false
                }
            ]
        }
    ]
},

create: function(context) {
    var config = context.options[0],
        sourceCode = context.getSourceCode(),
        checkFunctions = true,
        checkKeywords = true,
        checkClasses = true;

    if (typeof config === "object") {
        checkFunctions = config.functions !== "never";
        checkKeywords = config.keywords !== "never";
        checkClasses = config.classes !== "never";
    } else if (config === "never") {
        checkFunctions = false;
        checkKeywords = false;
        checkClasses = false;
    }

    /**
     * Checks whether or not a given token is an arrow operator (=>) or a keyword
     * in order to avoid to conflict with `arrow-spacing` and `keyword-spacing`.
     *
     * @param {Token} token - A token to check.
     * @returns {boolean} `true` if the token is an arrow operator.
     */
    function isConflicted(token) {
        return (token.type === "Punctuator" && token.value === "=>") || token.type === "Keyword";
    }

    /**
     * Checks the given BlockStatement node has a preceding space if it doesn’t start on a new line.
     * @param {ASTNode|Token} node The AST node of a BlockStatement.
     * @returns {void} undefined.
     */
    function checkPrecedingSpace(node) {
        var precedingToken = sourceCode.getTokenBefore(node),
            hasSpace,
            parent,
            requireSpace;

        if (precedingToken && !isConflicted(precedingToken) && astUtils.isTokenOnSameLine(precedingToken, node)) {
            hasSpace = sourceCode.isSpaceBetweenTokens(precedingToken, node);
            parent = context.getAncestors().pop();
            if (parent.type === "FunctionExpression" || parent.type === "FunctionDeclaration") {
                requireSpace = checkFunctions;
            } else if (node.type === "ClassBody") {
                requireSpace = checkClasses;
            } else {
                requireSpace = checkKeywords;
            }

            if (requireSpace) {
                if (!hasSpace) {
                    context.report({
                        node: node,
                        message: "Missing space before opening brace.",
                        fix: function(fixer) {
                            return fixer.insertTextBefore(node, " ");
                        }
                    });
                }
            } else {
                if (hasSpace) {
                    context.report({
                        node: node,
                        message: "Unexpected space before opening brace.",
                        fix: function(fixer) {
                            return fixer.removeRange([precedingToken.range[1], node.range[0]]);
                        }
                    });
                }
            }
        }
    }

    /**
     * Checks if the CaseBlock of an given SwitchStatement node has a preceding space.
     * @param {ASTNode} node The node of a SwitchStatement.
     * @returns {void} undefined.
     */
    function checkSpaceBeforeCaseBlock(node) {
        var cases = node.cases,
            firstCase,
            openingBrace;

        if (cases.length > 0) {
            firstCase = cases[0];
            openingBrace = sourceCode.getTokenBefore(firstCase);
        } else {
            openingBrace = sourceCode.getLastToken(node, 1);
        }

        checkPrecedingSpace(openingBrace);
    }

    return {
        BlockStatement: checkPrecedingSpace,
        ClassBody: checkPrecedingSpace,
        SwitchStatement: checkSpaceBeforeCaseBlock
    };

}

};

},{“../ast-utils”:124}],342:[function(require,module,exports){ /**

* @fileoverview Rule to validate spacing before function paren.
* @author Mathias Schreck <https://github.com/lo1tuma>
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "enforce consistent spacing before `function` definition opening parenthesis",
        category: "Stylistic Issues",
        recommended: false
    },

    fixable: "whitespace",

    schema: [
        {
            oneOf: [
                {
                    enum: ["always", "never"]
                },
                {
                    type: "object",
                    properties: {
                        anonymous: {
                            enum: ["always", "never", "ignore"]
                        },
                        named: {
                            enum: ["always", "never", "ignore"]
                        }
                    },
                    additionalProperties: false
                }
            ]
        }
    ]
},

create: function(context) {

    var configuration = context.options[0],
        sourceCode = context.getSourceCode(),
        requireAnonymousFunctionSpacing = true,
        forbidAnonymousFunctionSpacing = false,
        requireNamedFunctionSpacing = true,
        forbidNamedFunctionSpacing = false;

    if (typeof configuration === "object") {
        requireAnonymousFunctionSpacing = (
            !configuration.anonymous || configuration.anonymous === "always");
        forbidAnonymousFunctionSpacing = configuration.anonymous === "never";
        requireNamedFunctionSpacing = (
            !configuration.named || configuration.named === "always");
        forbidNamedFunctionSpacing = configuration.named === "never";
    } else if (configuration === "never") {
        requireAnonymousFunctionSpacing = false;
        forbidAnonymousFunctionSpacing = true;
        requireNamedFunctionSpacing = false;
        forbidNamedFunctionSpacing = true;
    }

    /**
     * Determines whether a function has a name.
     * @param {ASTNode} node The function node.
     * @returns {boolean} Whether the function has a name.
     */
    function isNamedFunction(node) {
        var parent;

        if (node.id) {
            return true;
        }

        parent = node.parent;
        return parent.type === "MethodDefinition" ||
            (parent.type === "Property" &&
                (
                    parent.kind === "get" ||
                    parent.kind === "set" ||
                    parent.method
                )
            );
    }

    /**
     * Validates the spacing before function parentheses.
     * @param {ASTNode} node The node to be validated.
     * @returns {void}
     */
    function validateSpacingBeforeParentheses(node) {
        var isNamed = isNamedFunction(node),
            leftToken,
            rightToken,
            location;

        if (node.generator && !isNamed) {
            return;
        }

        rightToken = sourceCode.getFirstToken(node);
        while (rightToken.value !== "(") {
            rightToken = sourceCode.getTokenAfter(rightToken);
        }
        leftToken = sourceCode.getTokenBefore(rightToken);
        location = leftToken.loc.end;

        if (sourceCode.isSpaceBetweenTokens(leftToken, rightToken)) {
            if ((isNamed && forbidNamedFunctionSpacing) || (!isNamed && forbidAnonymousFunctionSpacing)) {
                context.report({
                    node: node,
                    loc: location,
                    message: "Unexpected space before function parentheses.",
                    fix: function(fixer) {
                        return fixer.removeRange([leftToken.range[1], rightToken.range[0]]);
                    }
                });
            }
        } else {
            if ((isNamed && requireNamedFunctionSpacing) || (!isNamed && requireAnonymousFunctionSpacing)) {
                context.report({
                    node: node,
                    loc: location,
                    message: "Missing space before function parentheses.",
                    fix: function(fixer) {
                        return fixer.insertTextAfter(leftToken, " ");
                    }
                });
            }
        }
    }

    return {
        FunctionDeclaration: validateSpacingBeforeParentheses,
        FunctionExpression: validateSpacingBeforeParentheses
    };
}

};

},{}],343:[function(require,module,exports){ /**

* @fileoverview Disallows or enforces spaces inside of parentheses.
* @author Jonathan Rajavuori
*/

“use strict”;

var astUtils = require(“../ast-utils”);

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "enforce consistent spacing inside parentheses",
        category: "Stylistic Issues",
        recommended: false
    },

    fixable: "whitespace",

    schema: [
        {
            enum: ["always", "never"]
        },
        {
            type: "object",
            properties: {
                exceptions: {
                    type: "array",
                    items: {
                        enum: ["{}", "[]", "()", "empty"]
                    },
                    uniqueItems: true
                }
            },
            additionalProperties: false
        }
    ]
},

create: function(context) {

    var MISSING_SPACE_MESSAGE = "There must be a space inside this paren.",
        REJECTED_SPACE_MESSAGE = "There should be no spaces inside this paren.",
        ALWAYS = context.options[0] === "always",

        exceptionsArrayOptions = (context.options.length === 2) ? context.options[1].exceptions : [],
        options = {},
        exceptions;

    if (exceptionsArrayOptions.length) {
        options.braceException = exceptionsArrayOptions.indexOf("{}") !== -1;
        options.bracketException = exceptionsArrayOptions.indexOf("[]") !== -1;
        options.parenException = exceptionsArrayOptions.indexOf("()") !== -1;
        options.empty = exceptionsArrayOptions.indexOf("empty") !== -1;
    }

    /**
     * Produces an object with the opener and closer exception values
     * @param {Object} opts The exception options
     * @returns {Object} `openers` and `closers` exception values
     * @private
     */
    function getExceptions() {
        var openers = [],
            closers = [];

        if (options.braceException) {
            openers.push("{");
            closers.push("}");
        }

        if (options.bracketException) {
            openers.push("[");
            closers.push("]");
        }

        if (options.parenException) {
            openers.push("(");
            closers.push(")");
        }

        if (options.empty) {
            openers.push(")");
            closers.push("(");
        }

        return {
            openers: openers,
            closers: closers
        };
    }

    //--------------------------------------------------------------------------
    // Helpers
    //--------------------------------------------------------------------------
    var sourceCode = context.getSourceCode();

    /**
     * Determines if a token is one of the exceptions for the opener paren
     * @param {Object} token The token to check
     * @returns {boolean} True if the token is one of the exceptions for the opener paren
     */
    function isOpenerException(token) {
        return token.type === "Punctuator" && exceptions.openers.indexOf(token.value) >= 0;
    }

    /**
     * Determines if a token is one of the exceptions for the closer paren
     * @param {Object} token The token to check
     * @returns {boolean} True if the token is one of the exceptions for the closer paren
     */
    function isCloserException(token) {
        return token.type === "Punctuator" && exceptions.closers.indexOf(token.value) >= 0;
    }

    /**
     * Determines if an opener paren should have a missing space after it
     * @param {Object} left The paren token
     * @param {Object} right The token after it
     * @returns {boolean} True if the paren should have a space
     */
    function shouldOpenerHaveSpace(left, right) {
        if (sourceCode.isSpaceBetweenTokens(left, right)) {
            return false;
        }

        if (ALWAYS) {
            if (right.type === "Punctuator" && right.value === ")") {
                return false;
            }
            return !isOpenerException(right);
        } else {
            return isOpenerException(right);
        }
    }

    /**
     * Determines if an closer paren should have a missing space after it
     * @param {Object} left The token before the paren
     * @param {Object} right The paren token
     * @returns {boolean} True if the paren should have a space
     */
    function shouldCloserHaveSpace(left, right) {
        if (left.type === "Punctuator" && left.value === "(") {
            return false;
        }

        if (sourceCode.isSpaceBetweenTokens(left, right)) {
            return false;
        }

        if (ALWAYS) {
            return !isCloserException(left);
        } else {
            return isCloserException(left);
        }
    }

    /**
     * Determines if an opener paren should not have an existing space after it
     * @param {Object} left The paren token
     * @param {Object} right The token after it
     * @returns {boolean} True if the paren should reject the space
     */
    function shouldOpenerRejectSpace(left, right) {
        if (right.type === "Line") {
            return false;
        }

        if (!astUtils.isTokenOnSameLine(left, right)) {
            return false;
        }

        if (!sourceCode.isSpaceBetweenTokens(left, right)) {
            return false;
        }

        if (ALWAYS) {
            return isOpenerException(right);
        } else {
            return !isOpenerException(right);
        }
    }

    /**
     * Determines if an closer paren should not have an existing space after it
     * @param {Object} left The token before the paren
     * @param {Object} right The paren token
     * @returns {boolean} True if the paren should reject the space
     */
    function shouldCloserRejectSpace(left, right) {
        if (left.type === "Punctuator" && left.value === "(") {
            return false;
        }

        if (!astUtils.isTokenOnSameLine(left, right)) {
            return false;
        }

        if (!sourceCode.isSpaceBetweenTokens(left, right)) {
            return false;
        }

        if (ALWAYS) {
            return isCloserException(left);
        } else {
            return !isCloserException(left);
        }
    }

    //--------------------------------------------------------------------------
    // Public
    //--------------------------------------------------------------------------

    return {
        Program: function checkParenSpaces(node) {
            var tokens, prevToken, nextToken;

            exceptions = getExceptions();
            tokens = sourceCode.tokensAndComments;

            tokens.forEach(function(token, i) {
                prevToken = tokens[i - 1];
                nextToken = tokens[i + 1];

                if (token.type !== "Punctuator") {
                    return;
                }

                if (token.value !== "(" && token.value !== ")") {
                    return;
                }

                if (token.value === "(" && shouldOpenerHaveSpace(token, nextToken)) {
                    context.report({
                        node: node,
                        loc: token.loc.start,
                        message: MISSING_SPACE_MESSAGE,
                        fix: function(fixer) {
                            return fixer.insertTextAfter(token, " ");
                        }
                    });
                } else if (token.value === "(" && shouldOpenerRejectSpace(token, nextToken)) {
                    context.report({
                        node: node,
                        loc: token.loc.start,
                        message: REJECTED_SPACE_MESSAGE,
                        fix: function(fixer) {
                            return fixer.removeRange([token.range[1], nextToken.range[0]]);
                        }
                    });
                } else if (token.value === ")" && shouldCloserHaveSpace(prevToken, token)) {

                    // context.report(node, token.loc.start, MISSING_SPACE_MESSAGE);
                    context.report({
                        node: node,
                        loc: token.loc.start,
                        message: MISSING_SPACE_MESSAGE,
                        fix: function(fixer) {
                            return fixer.insertTextBefore(token, " ");
                        }
                    });
                } else if (token.value === ")" && shouldCloserRejectSpace(prevToken, token)) {
                    context.report({
                        node: node,
                        loc: token.loc.start,
                        message: REJECTED_SPACE_MESSAGE,
                        fix: function(fixer) {
                            return fixer.removeRange([prevToken.range[1], token.range[0]]);
                        }
                    });
                }
            });
        }
    };

}

};

},{“../ast-utils”:124}],344:[function(require,module,exports){ /**

* @fileoverview Require spaces around infix operators
* @author Michael Ficarra
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "require spacing around operators",
        category: "Stylistic Issues",
        recommended: false
    },

    fixable: "whitespace",

    schema: [
        {
            type: "object",
            properties: {
                int32Hint: {
                    type: "boolean"
                }
            },
            additionalProperties: false
        }
    ]
},

create: function(context) {
    var int32Hint = context.options[0] ? context.options[0].int32Hint === true : false;

    var OPERATORS = [
        "*", "/", "%", "+", "-", "<<", ">>", ">>>", "<", "<=", ">", ">=", "in",
        "instanceof", "==", "!=", "===", "!==", "&", "^", "|", "&&", "||", "=",
        "+=", "-=", "*=", "/=", "%=", "<<=", ">>=", ">>>=", "&=", "^=", "|=",
        "?", ":", ",", "**"
    ];

    var sourceCode = context.getSourceCode();

    /**
     * Returns the first token which violates the rule
     * @param {ASTNode} left - The left node of the main node
     * @param {ASTNode} right - The right node of the main node
     * @returns {object} The violator token or null
     * @private
     */
    function getFirstNonSpacedToken(left, right) {
        var op,
            tokens = sourceCode.getTokensBetween(left, right, 1);

        for (var i = 1, l = tokens.length - 1; i < l; ++i) {
            op = tokens[i];
            if (
                op.type === "Punctuator" &&
                OPERATORS.indexOf(op.value) >= 0 &&
                (tokens[i - 1].range[1] >= op.range[0] || op.range[1] >= tokens[i + 1].range[0])
            ) {
                return op;
            }
        }
        return null;
    }

    /**
     * Reports an AST node as a rule violation
     * @param {ASTNode} mainNode - The node to report
     * @param {object} culpritToken - The token which has a problem
     * @returns {void}
     * @private
     */
    function report(mainNode, culpritToken) {
        context.report({
            node: mainNode,
            loc: culpritToken.loc.start,
            message: "Infix operators must be spaced.",
            fix: function(fixer) {
                var previousToken = sourceCode.getTokenBefore(culpritToken);
                var afterToken = sourceCode.getTokenAfter(culpritToken);
                var fixString = "";

                if (culpritToken.range[0] - previousToken.range[1] === 0) {
                    fixString = " ";
                }

                fixString += culpritToken.value;

                if (afterToken.range[0] - culpritToken.range[1] === 0) {
                    fixString += " ";
                }

                return fixer.replaceText(culpritToken, fixString);
            }
        });
    }

    /**
     * Check if the node is binary then report
     * @param {ASTNode} node node to evaluate
     * @returns {void}
     * @private
     */
    function checkBinary(node) {
        var nonSpacedNode = getFirstNonSpacedToken(node.left, node.right);

        if (nonSpacedNode) {
            if (!(int32Hint && sourceCode.getText(node).substr(-2) === "|0")) {
                report(node, nonSpacedNode);
            }
        }
    }

    /**
     * Check if the node is conditional
     * @param {ASTNode} node node to evaluate
     * @returns {void}
     * @private
     */
    function checkConditional(node) {
        var nonSpacedConsequesntNode = getFirstNonSpacedToken(node.test, node.consequent);
        var nonSpacedAlternateNode = getFirstNonSpacedToken(node.consequent, node.alternate);

        if (nonSpacedConsequesntNode) {
            report(node, nonSpacedConsequesntNode);
        } else if (nonSpacedAlternateNode) {
            report(node, nonSpacedAlternateNode);
        }
    }

    /**
     * Check if the node is a variable
     * @param {ASTNode} node node to evaluate
     * @returns {void}
     * @private
     */
    function checkVar(node) {
        var nonSpacedNode;

        if (node.init) {
            nonSpacedNode = getFirstNonSpacedToken(node.id, node.init);
            if (nonSpacedNode) {
                report(node, nonSpacedNode);
            }
        }
    }

    return {
        AssignmentExpression: checkBinary,
        AssignmentPattern: checkBinary,
        BinaryExpression: checkBinary,
        LogicalExpression: checkBinary,
        ConditionalExpression: checkConditional,
        VariableDeclarator: checkVar
    };

}

};

},{}],345:[function(require,module,exports){ /**

* @fileoverview This rule shoud require or disallow spaces before or after unary operations.
* @author Marcin Kumorek
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "enforce consistent spacing before or after unary operators",
        category: "Stylistic Issues",
        recommended: false
    },

    fixable: "whitespace",

    schema: [
        {
            type: "object",
            properties: {
                words: {
                    type: "boolean"
                },
                nonwords: {
                    type: "boolean"
                },
                overrides: {
                    type: "object",
                    additionalProperties: {
                        type: "boolean"
                    }
                }
            },
            additionalProperties: false
        }
    ]
},

create: function(context) {
    var options = context.options && Array.isArray(context.options) && context.options[0] || { words: true, nonwords: false };

    var sourceCode = context.getSourceCode();

    //--------------------------------------------------------------------------
    // Helpers
    //--------------------------------------------------------------------------

    /**
    * Check if the node is the first "!" in a "!!" convert to Boolean expression
    * @param {ASTnode} node AST node
    * @returns {boolean} Whether or not the node is first "!" in "!!"
    */
    function isFirstBangInBangBangExpression(node) {
        return node && node.type === "UnaryExpression" && node.argument.operator === "!" &&
            node.argument && node.argument.type === "UnaryExpression" && node.argument.operator === "!";
    }

    /**
    * Check if the node's child argument is an "ObjectExpression"
    * @param {ASTnode} node AST node
    * @returns {boolean} Whether or not the argument's type is "ObjectExpression"
    */
    function isArgumentObjectExpression(node) {
        return node.argument && node.argument.type && node.argument.type === "ObjectExpression";
    }

    /**
    * Checks if an override exists for a given operator.
    * @param {ASTnode} node AST node
    * @param {string} operator Operator
    * @returns {boolean} Whether or not an override has been provided for the operator
    */
    function overrideExistsForOperator(node, operator) {
        return options.overrides && options.overrides.hasOwnProperty(operator);
    }

    /**
    * Gets the value that the override was set to for this operator
    * @param {ASTnode} node AST node
    * @param {string} operator Operator
    * @returns {boolean} Whether or not an override enforces a space with this operator
    */
    function overrideEnforcesSpaces(node, operator) {
        return options.overrides[operator];
    }

    /**
    * Verify Unary Word Operator has spaces after the word operator
    * @param {ASTnode} node AST node
    * @param {object} firstToken first token from the AST node
    * @param {object} secondToken second token from the AST node
    * @param {string} word The word to be used for reporting
    * @returns {void}
    */
    function verifyWordHasSpaces(node, firstToken, secondToken, word) {
        if (secondToken.range[0] === firstToken.range[1]) {
            context.report({
                node: node,
                message: "Unary word operator '" + word + "' must be followed by whitespace.",
                fix: function(fixer) {
                    return fixer.insertTextAfter(firstToken, " ");
                }
            });
        }
    }

    /**
    * Verify Unary Word Operator doesn't have spaces after the word operator
    * @param {ASTnode} node AST node
    * @param {object} firstToken first token from the AST node
    * @param {object} secondToken second token from the AST node
    * @param {string} word The word to be used for reporting
    * @returns {void}
    */
    function verifyWordDoesntHaveSpaces(node, firstToken, secondToken, word) {
        if (isArgumentObjectExpression(node)) {
            if (secondToken.range[0] > firstToken.range[1]) {
                context.report({
                    node: node,
                    message: "Unexpected space after unary word operator '" + word + "'.",
                    fix: function(fixer) {
                        return fixer.removeRange([firstToken.range[1], secondToken.range[0]]);
                    }
                });
            }
        }
    }

    /**
    * Check Unary Word Operators for spaces after the word operator
    * @param {ASTnode} node AST node
    * @param {object} firstToken first token from the AST node
    * @param {object} secondToken second token from the AST node
    * @param {string} word The word to be used for reporting
    * @returns {void}
    */
    function checkUnaryWordOperatorForSpaces(node, firstToken, secondToken, word) {
        word = word || firstToken.value;

        if (overrideExistsForOperator(node, word)) {
            if (overrideEnforcesSpaces(node, word)) {
                verifyWordHasSpaces(node, firstToken, secondToken, word);
            } else {
                verifyWordDoesntHaveSpaces(node, firstToken, secondToken, word);
            }
        } else if (options.words) {
            verifyWordHasSpaces(node, firstToken, secondToken, word);
        } else {
            verifyWordDoesntHaveSpaces(node, firstToken, secondToken, word);
        }
    }

    /**
    * Verifies YieldExpressions satisfy spacing requirements
    * @param {ASTnode} node AST node
    * @returns {void}
    */
    function checkForSpacesAfterYield(node) {
        var tokens = sourceCode.getFirstTokens(node, 3),
            word = "yield";

        if (!node.argument || node.delegate) {
            return;
        }

        checkUnaryWordOperatorForSpaces(node, tokens[0], tokens[1], word);
    }

    /**
    * Verifies UnaryExpression, UpdateExpression and NewExpression have spaces before or after the operator
    * @param {ASTnode} node AST node
    * @param {object} firstToken First token in the expression
    * @param {object} secondToken Second token in the expression
    * @returns {void}
    */
    function verifyNonWordsHaveSpaces(node, firstToken, secondToken) {
        if (node.prefix) {
            if (isFirstBangInBangBangExpression(node)) {
                return;
            }
            if (firstToken.range[1] === secondToken.range[0]) {
                context.report({
                    node: node,
                    message: "Unary operator '" + firstToken.value + "' must be followed by whitespace.",
                    fix: function(fixer) {
                        return fixer.insertTextAfter(firstToken, " ");
                    }
                });
            }
        } else {
            if (firstToken.range[1] === secondToken.range[0]) {
                context.report({
                    node: node,
                    message: "Space is required before unary expressions '" + secondToken.value + "'.",
                    fix: function(fixer) {
                        return fixer.insertTextBefore(secondToken, " ");
                    }
                });
            }
        }
    }

    /**
    * Verifies UnaryExpression, UpdateExpression and NewExpression don't have spaces before or after the operator
    * @param {ASTnode} node AST node
    * @param {object} firstToken First token in the expression
    * @param {object} secondToken Second token in the expression
    * @returns {void}
    */
    function verifyNonWordsDontHaveSpaces(node, firstToken, secondToken) {
        if (node.prefix) {
            if (secondToken.range[0] > firstToken.range[1]) {
                context.report({
                    node: node,
                    message: "Unexpected space after unary operator '" + firstToken.value + "'.",
                    fix: function(fixer) {
                        return fixer.removeRange([firstToken.range[1], secondToken.range[0]]);
                    }
                });
            }
        } else {
            if (secondToken.range[0] > firstToken.range[1]) {
                context.report({
                    node: node,
                    message: "Unexpected space before unary operator '" + secondToken.value + "'.",
                    fix: function(fixer) {
                        return fixer.removeRange([firstToken.range[1], secondToken.range[0]]);
                    }
                });
            }
        }
    }

    /**
    * Verifies UnaryExpression, UpdateExpression and NewExpression satisfy spacing requirements
    * @param {ASTnode} node AST node
    * @returns {void}
    */
    function checkForSpaces(node) {
        var tokens = sourceCode.getFirstTokens(node, 2),
            firstToken = tokens[0],
            secondToken = tokens[1];

        if ((node.type === "NewExpression" || node.prefix) && firstToken.type === "Keyword") {
            checkUnaryWordOperatorForSpaces(node, firstToken, secondToken);
            return;
        }

        var operator = node.prefix ? tokens[0].value : tokens[1].value;

        if (overrideExistsForOperator(node, operator)) {
            if (overrideEnforcesSpaces(node, operator)) {
                verifyNonWordsHaveSpaces(node, firstToken, secondToken);
            } else {
                verifyNonWordsDontHaveSpaces(node, firstToken, secondToken);
            }
        } else if (options.nonwords) {
            verifyNonWordsHaveSpaces(node, firstToken, secondToken);
        } else {
            verifyNonWordsDontHaveSpaces(node, firstToken, secondToken);
        }
    }

    //--------------------------------------------------------------------------
    // Public
    //--------------------------------------------------------------------------

    return {
        UnaryExpression: checkForSpaces,
        UpdateExpression: checkForSpaces,
        NewExpression: checkForSpaces,
        YieldExpression: checkForSpacesAfterYield
    };

}

};

},{}],346:[function(require,module,exports){ /**

* @fileoverview Source code for spaced-comments rule
* @author Gyandeep Singh
*/

“use strict”;

var lodash = require(“lodash”);

//—————————————————————————— // Helpers //——————————————————————————

/**

* Escapes the control characters of a given string.
* @param {string} s - A string to escape.
* @returns {string} An escaped string.
*/

function escape(s) {

var isOneChar = s.length === 1;

s = lodash.escapeRegExp(s);
return isOneChar ? s : "(?:" + s + ")";

}

/**

* Escapes the control characters of a given string.
* And adds a repeat flag.
* @param {string} s - A string to escape.
* @returns {string} An escaped string.
*/

function escapeAndRepeat(s) {

return escape(s) + "+";

}

/**

* Parses `markers` option.
* If markers don't include `"*"`, this adds `"*"` to allow JSDoc comments.
* @param {string[]} [markers] - A marker list.
* @returns {string[]} A marker list.
*/

function parseMarkersOption(markers) {

markers = markers ? markers.slice(0) : [];

// `*` is a marker for JSDoc comments.
if (markers.indexOf("*") === -1) {
    markers.push("*");
}

return markers;

}

/**

* Creates RegExp object for `always` mode.
* Generated pattern is below:
*
* 1. First, a marker or nothing.
* 2. Next, a space or an exception pattern sequence.
*
* @param {string[]} markers - A marker list.
* @param {string[]} exceptions - A exception pattern list.
* @returns {RegExp} A RegExp object for `always` mode.
*/

function createAlwaysStylePattern(markers, exceptions) {

var pattern = "^";

/*
 * A marker or nothing.
 * ["*"]            ==> "\*?"
 * ["*", "!"]       ==> "(?:\*|!)?"
 * ["*", "/", "!<"] ==> "(?:\*|\/|(?:!<))?" ==> https://jex.im/regulex/#!embed=false&flags=&re=(%3F%3A%5C*%7C%5C%2F%7C(%3F%3A!%3C))%3F
 */
if (markers.length === 1) {

    // the marker.
    pattern += escape(markers[0]);
} else {

    // one of markers.
    pattern += "(?:";
    pattern += markers.map(escape).join("|");
    pattern += ")";
}

pattern += "?"; // or nothing.

/*
 * A space or an exception pattern sequence.
 * []                 ==> "\s"
 * ["-"]              ==> "(?:\s|\-+$)"
 * ["-", "="]         ==> "(?:\s|(?:\-+|=+)$)"
 * ["-", "=", "--=="] ==> "(?:\s|(?:\-+|=+|(?:\-\-==)+)$)" ==> https://jex.im/regulex/#!embed=false&flags=&re=(%3F%3A%5Cs%7C(%3F%3A%5C-%2B%7C%3D%2B%7C(%3F%3A%5C-%5C-%3D%3D)%2B)%24)
 */
if (exceptions.length === 0) {

    // a space.
    pattern += "\\s";
} else {

    // a space or...
    pattern += "(?:\\s|";

    if (exceptions.length === 1) {

        // a sequence of the exception pattern.
        pattern += escapeAndRepeat(exceptions[0]);
    } else {

        // a sequence of one of exception patterns.
        pattern += "(?:";
        pattern += exceptions.map(escapeAndRepeat).join("|");
        pattern += ")";
    }

    pattern += "(?:$|[\n\r]))"; // the sequence continues until the end.
}

return new RegExp(pattern);

}

/**

* Creates RegExp object for `never` mode.
* Generated pattern is below:
*
* 1. First, a marker or nothing (captured).
* 2. Next, a space or a tab.
*
* @param {string[]} markers - A marker list.
* @returns {RegExp} A RegExp object for `never` mode.
*/

function createNeverStylePattern(markers) {

var pattern = "^(" + markers.map(escape).join("|") + ")?[ \t]+";

return new RegExp(pattern);

}

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "enforce consistent spacing after the `//` or `/*` in a comment",
        category: "Stylistic Issues",
        recommended: false
    },

    fixable: "whitespace",

    schema: [
        {
            enum: ["always", "never"]
        },
        {
            type: "object",
            properties: {
                exceptions: {
                    type: "array",
                    items: {
                        type: "string"
                    }
                },
                markers: {
                    type: "array",
                    items: {
                        type: "string"
                    }
                },
                line: {
                    type: "object",
                    properties: {
                        exceptions: {
                            type: "array",
                            items: {
                                type: "string"
                            }
                        },
                        markers: {
                            type: "array",
                            items: {
                                type: "string"
                            }
                        }
                    },
                    additionalProperties: false
                },
                block: {
                    type: "object",
                    properties: {
                        exceptions: {
                            type: "array",
                            items: {
                                type: "string"
                            }
                        },
                        markers: {
                            type: "array",
                            items: {
                                type: "string"
                            }
                        }
                    },
                    additionalProperties: false
                }
            },
            additionalProperties: false
        }
    ]
},

create: function(context) {

    // Unless the first option is never, require a space
    var requireSpace = context.options[0] !== "never";

    /*
     * Parse the second options.
     * If markers don't include `"*"`, it's added automatically for JSDoc
     * comments.
     */
    var config = context.options[1] || {};
    var styleRules = ["block", "line"].reduce(function(rule, type) {
        var markers = parseMarkersOption(config[type] && config[type].markers || config.markers);
        var exceptions = config[type] && config[type].exceptions || config.exceptions || [];

        // Create RegExp object for valid patterns.
        rule[type] = {
            regex: requireSpace ? createAlwaysStylePattern(markers, exceptions) : createNeverStylePattern(markers),
            hasExceptions: exceptions.length > 0,
            markers: new RegExp("^(" + markers.map(escape).join("|") + ")")
        };

        return rule;
    }, {});

    /**
     * Reports a spacing error with an appropriate message.
     * @param {ASTNode} node - A comment node to check.
     * @param {string} message - An error message to report
     * @param {Array} match - An array of match results for markers.
     * @returns {void}
     */
    function report(node, message, match) {
        var type = node.type.toLowerCase(),
            commentIdentifier = type === "block" ? "/*" : "//";

        context.report({
            node: node,
            fix: function(fixer) {
                var start = node.range[0],
                    end = start + 2;

                if (requireSpace) {
                    if (match) {
                        end += match[0].length;
                    }
                    return fixer.insertTextAfterRange([start, end], " ");
                } else {
                    end += match[0].length;
                    return fixer.replaceTextRange([start, end], commentIdentifier + (match[1] ? match[1] : ""));
                }
            },
            message: message
        });
    }

    /**
     * Reports a given comment if it's invalid.
     * @param {ASTNode} node - a comment node to check.
     * @returns {void}
     */
    function checkCommentForSpace(node) {
        var type = node.type.toLowerCase(),
            rule = styleRules[type],
            commentIdentifier = type === "block" ? "/*" : "//";

        // Ignores empty comments.
        if (node.value.length === 0) {
            return;
        }

        // Checks.
        if (requireSpace) {
            if (!rule.regex.test(node.value)) {
                var hasMarker = rule.markers.exec(node.value);
                var marker = hasMarker ? commentIdentifier + hasMarker[0] : commentIdentifier;

                if (rule.hasExceptions) {
                    report(node, "Expected exception block, space or tab after '" + marker + "' in comment.", hasMarker);
                } else {
                    report(node, "Expected space or tab after '" + marker + "' in comment.", hasMarker);
                }
            }
        } else {
            var matched = rule.regex.exec(node.value);

            if (matched) {
                if (!matched[1]) {
                    report(node, "Unexpected space or tab after '" + commentIdentifier + "' in comment.", matched);
                } else {
                    report(node, "Unexpected space or tab after marker (" + matched[1] + ") in comment.", matched);
                }
            }
        }
    }

    return {

        LineComment: checkCommentForSpace,
        BlockComment: checkCommentForSpace

    };
}

};

},{“lodash”:108}],347:[function(require,module,exports){ /**

* @fileoverview Rule to control usage of strict mode directives.
* @author Brandon Mills
*/

“use strict”;

//—————————————————————————— // Requirements //——————————————————————————

var lodash = require(“lodash”);

//—————————————————————————— // Helpers //——————————————————————————

var messages = {

function: "Use the function form of 'use strict'.",
global: "Use the global form of 'use strict'.",
multiple: "Multiple 'use strict' directives.",
never: "Strict mode is not permitted.",
unnecessary: "Unnecessary 'use strict' directive.",
module: "'use strict' is unnecessary inside of modules.",
implied: "'use strict' is unnecessary when implied strict mode is enabled.",
unnecessaryInClasses: "'use strict' is unnecessary inside of classes."

};

/**

* Gets all of the Use Strict Directives in the Directive Prologue of a group of
* statements.
* @param {ASTNode[]} statements Statements in the program or function body.
* @returns {ASTNode[]} All of the Use Strict Directives.
*/

function getUseStrictDirectives(statements) {

var directives = [],
    i, statement;

for (i = 0; i < statements.length; i++) {
    statement = statements[i];

    if (
        statement.type === "ExpressionStatement" &&
        statement.expression.type === "Literal" &&
        statement.expression.value === "use strict"
    ) {
        directives[i] = statement;
    } else {
        break;
    }
}

return directives;

}

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "require or disallow strict mode directives",
        category: "Strict Mode",
        recommended: false
    },

    schema: [
        {
            enum: ["never", "global", "function", "safe"]
        }
    ]
},

create: function(context) {

    var mode = context.options[0] || "safe",
        ecmaFeatures = context.parserOptions.ecmaFeatures || {},
        scopes = [],
        classScopes = [],
        rule;

    if (ecmaFeatures.impliedStrict) {
        mode = "implied";
    } else if (mode === "safe") {
        mode = ecmaFeatures.globalReturn ? "global" : "function";
    }

    /**
     * Report a slice of an array of nodes with a given message.
     * @param {ASTNode[]} nodes Nodes.
     * @param {string} start Index to start from.
     * @param {string} end Index to end before.
     * @param {string} message Message to display.
     * @returns {void}
     */
    function reportSlice(nodes, start, end, message) {
        var i;

        for (i = start; i < end; i++) {
            context.report(nodes[i], message);
        }
    }

    /**
     * Report all nodes in an array with a given message.
     * @param {ASTNode[]} nodes Nodes.
     * @param {string} message Message to display.
     * @returns {void}
     */
    function reportAll(nodes, message) {
        reportSlice(nodes, 0, nodes.length, message);
    }

    /**
     * Report all nodes in an array, except the first, with a given message.
     * @param {ASTNode[]} nodes Nodes.
     * @param {string} message Message to display.
     * @returns {void}
     */
    function reportAllExceptFirst(nodes, message) {
        reportSlice(nodes, 1, nodes.length, message);
    }

    /**
     * Entering a function in 'function' mode pushes a new nested scope onto the
     * stack. The new scope is true if the nested function is strict mode code.
     * @param {ASTNode} node The function declaration or expression.
     * @param {ASTNode[]} useStrictDirectives The Use Strict Directives of the node.
     * @returns {void}
     */
    function enterFunctionInFunctionMode(node, useStrictDirectives) {
        var isInClass = classScopes.length > 0,
            isParentGlobal = scopes.length === 0 && classScopes.length === 0,
            isParentStrict = scopes.length > 0 && scopes[scopes.length - 1],
            isStrict = useStrictDirectives.length > 0;

        if (isStrict) {
            if (isParentStrict) {
                context.report(useStrictDirectives[0], messages.unnecessary);
            } else if (isInClass) {
                context.report(useStrictDirectives[0], messages.unnecessaryInClasses);
            }

            reportAllExceptFirst(useStrictDirectives, messages.multiple);
        } else if (isParentGlobal) {
            context.report(node, messages.function);
        }

        scopes.push(isParentStrict || isStrict);
    }

    /**
     * Exiting a function in 'function' mode pops its scope off the stack.
     * @returns {void}
     */
    function exitFunctionInFunctionMode() {
        scopes.pop();
    }

    /**
     * Enter a function and either:
     * - Push a new nested scope onto the stack (in 'function' mode).
     * - Report all the Use Strict Directives (in the other modes).
     * @param {ASTNode} node The function declaration or expression.
     * @returns {void}
     */
    function enterFunction(node) {
        var isBlock = node.body.type === "BlockStatement",
            useStrictDirectives = isBlock ?
                getUseStrictDirectives(node.body.body) : [];

        if (mode === "function") {
            enterFunctionInFunctionMode(node, useStrictDirectives);
        } else {
            reportAll(useStrictDirectives, messages[mode]);
        }
    }

    rule = {
        Program: function(node) {
            var useStrictDirectives = getUseStrictDirectives(node.body);

            if (node.sourceType === "module") {
                mode = "module";
            }

            if (mode === "global") {
                if (node.body.length > 0 && useStrictDirectives.length === 0) {
                    context.report(node, messages.global);
                }
                reportAllExceptFirst(useStrictDirectives, messages.multiple);
            } else {
                reportAll(useStrictDirectives, messages[mode]);
            }
        },
        FunctionDeclaration: enterFunction,
        FunctionExpression: enterFunction,
        ArrowFunctionExpression: enterFunction
    };

    if (mode === "function") {
        lodash.assign(rule, {

            // Inside of class bodies are always strict mode.
            ClassBody: function() {
                classScopes.push(true);
            },
            "ClassBody:exit": function() {
                classScopes.pop();
            },

            "FunctionDeclaration:exit": exitFunctionInFunctionMode,
            "FunctionExpression:exit": exitFunctionInFunctionMode,
            "ArrowFunctionExpression:exit": exitFunctionInFunctionMode
        });
    }

    return rule;
}

};

},{“lodash”:108}],348:[function(require,module,exports){ /**

* @fileoverview Rule to enforce spacing around embedded expressions of template strings
* @author Toru Nagashima
*/

“use strict”;

//—————————————————————————— // Requirements //——————————————————————————

var astUtils = require(“../ast-utils”);

//—————————————————————————— // Helpers //——————————————————————————

var OPEN_PAREN = /${$/; var CLOSE_PAREN = /^}/;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "require or disallow spacing around embedded expressions of template strings",
        category: "ECMAScript 6",
        recommended: false
    },

    fixable: "whitespace",

    schema: [
        {enum: ["always", "never"]}
    ]
},

create: function(context) {
    var sourceCode = context.getSourceCode();
    var always = context.options[0] === "always";
    var prefix = always ? "Expected" : "Unexpected";

    /**
     * Checks spacing before `}` of a given token.
     * @param {Token} token - A token to check. This is a Template token.
     * @returns {void}
     */
    function checkSpacingBefore(token) {
        var prevToken = sourceCode.getTokenBefore(token);

        if (prevToken &&
            CLOSE_PAREN.test(token.value) &&
            astUtils.isTokenOnSameLine(prevToken, token) &&
            sourceCode.isSpaceBetweenTokens(prevToken, token) !== always
        ) {
            context.report({
                loc: token.loc.start,
                message: prefix + " space(s) before '}'.",
                fix: function(fixer) {
                    if (always) {
                        return fixer.insertTextBefore(token, " ");
                    }
                    return fixer.removeRange([
                        prevToken.range[1],
                        token.range[0]
                    ]);
                }
            });
        }
    }

    /**
     * Checks spacing after `${` of a given token.
     * @param {Token} token - A token to check. This is a Template token.
     * @returns {void}
     */
    function checkSpacingAfter(token) {
        var nextToken = sourceCode.getTokenAfter(token);

        if (nextToken &&
            OPEN_PAREN.test(token.value) &&
            astUtils.isTokenOnSameLine(token, nextToken) &&
            sourceCode.isSpaceBetweenTokens(token, nextToken) !== always
        ) {
            context.report({
                loc: {
                    line: token.loc.end.line,
                    column: token.loc.end.column - 2
                },
                message: prefix + " space(s) after '${'.",
                fix: function(fixer) {
                    if (always) {
                        return fixer.insertTextAfter(token, " ");
                    }
                    return fixer.removeRange([
                        token.range[1],
                        nextToken.range[0]
                    ]);
                }
            });
        }
    }

    return {
        TemplateElement: function(node) {
            var token = sourceCode.getFirstToken(node);

            checkSpacingBefore(token);
            checkSpacingAfter(token);
        }
    };
}

};

},{“../ast-utils”:124}],349:[function(require,module,exports){ /**

* @fileoverview Require or disallow Unicode BOM
* @author Andrew Johnston <https://github.com/ehjay>
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "require or disallow Unicode BOM",
        category: "Stylistic Issues",
        recommended: false
    },

    fixable: "whitespace",

    schema: [
        {
            enum: ["always", "never"]
        }
    ]
},

create: function(context) {

    //--------------------------------------------------------------------------
    // Public
    //--------------------------------------------------------------------------

    return {

        Program: function checkUnicodeBOM(node) {

            var sourceCode = context.getSourceCode(),
                location = {column: 0, line: 1},
                requireBOM = context.options[0] || "never";

            if (!sourceCode.hasBOM && (requireBOM === "always")) {
                context.report({
                    node: node,
                    loc: location,
                    message: "Expected Unicode BOM (Byte Order Mark).",
                    fix: function(fixer) {
                        return fixer.insertTextBefore(node, "\uFEFF");
                    }
                });
            } else if (sourceCode.hasBOM && (requireBOM === "never")) {
                context.report({
                    node: node,
                    loc: location,
                    message: "Unexpected Unicode BOM (Byte Order Mark).",
                    fix: function(fixer) {
                        return fixer.removeRange([-1, 0]);
                    }
                });
            }
        }

    };

}

};

},{}],350:[function(require,module,exports){ /**

* @fileoverview Rule to flag comparisons to the value NaN
* @author James Allardice
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "require calls to `isNaN()` when checking for `NaN`",
        category: "Possible Errors",
        recommended: true
    },

    schema: []
},

create: function(context) {

    return {
        BinaryExpression: function(node) {
            if (/^(?:[<>]|[!=]=)=?$/.test(node.operator) && (node.left.name === "NaN" || node.right.name === "NaN")) {
                context.report(node, "Use the isNaN function to compare with NaN.");
            }
        }
    };

}

};

},{}],351:[function(require,module,exports){ /**

* @fileoverview Validates JSDoc comments are syntactically correct
* @author Nicholas C. Zakas
*/

“use strict”;

//—————————————————————————— // Requirements //——————————————————————————

var doctrine = require(“doctrine”);

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "enforce valid JSDoc comments",
        category: "Possible Errors",
        recommended: false
    },

    schema: [
        {
            type: "object",
            properties: {
                prefer: {
                    type: "object",
                    additionalProperties: {
                        type: "string"
                    }
                },
                preferType: {
                    type: "object",
                    additionalProperties: {
                        type: "string"
                    }
                },
                requireReturn: {
                    type: "boolean"
                },
                requireParamDescription: {
                    type: "boolean"
                },
                requireReturnDescription: {
                    type: "boolean"
                },
                matchDescription: {
                    type: "string"
                },
                requireReturnType: {
                    type: "boolean"
                }
            },
            additionalProperties: false
        }
    ]
},

create: function(context) {

    var options = context.options[0] || {},
        prefer = options.prefer || {},
        sourceCode = context.getSourceCode(),

        // these both default to true, so you have to explicitly make them false
        requireReturn = options.requireReturn !== false,
        requireParamDescription = options.requireParamDescription !== false,
        requireReturnDescription = options.requireReturnDescription !== false,
        requireReturnType = options.requireReturnType !== false,
        preferType = options.preferType || {},
        checkPreferType = Object.keys(preferType).length !== 0;

    //--------------------------------------------------------------------------
    // Helpers
    //--------------------------------------------------------------------------

    // Using a stack to store if a function returns or not (handling nested functions)
    var fns = [];

    /**
     * Check if node type is a Class
     * @param {ASTNode} node node to check.
     * @returns {boolean} True is its a class
     * @private
     */
    function isTypeClass(node) {
        return node.type === "ClassExpression" || node.type === "ClassDeclaration";
    }

    /**
     * When parsing a new function, store it in our function stack.
     * @param {ASTNode} node A function node to check.
     * @returns {void}
     * @private
     */
    function startFunction(node) {
        fns.push({
            returnPresent: (node.type === "ArrowFunctionExpression" && node.body.type !== "BlockStatement") ||
                isTypeClass(node)
        });
    }

    /**
     * Indicate that return has been found in the current function.
     * @param {ASTNode} node The return node.
     * @returns {void}
     * @private
     */
    function addReturn(node) {
        var functionState = fns[fns.length - 1];

        if (functionState && node.argument !== null) {
            functionState.returnPresent = true;
        }
    }

    /**
     * Check if return tag type is void or undefined
     * @param {Object} tag JSDoc tag
     * @returns {boolean} True if its of type void or undefined
     * @private
     */
    function isValidReturnType(tag) {
        return tag.type === null || tag.type.name === "void" || tag.type.type === "UndefinedLiteral";
    }

    /**
     * Check if type should be validated based on some exceptions
     * @param {Object} type JSDoc tag
     * @returns {boolean} True if it can be validated
     * @private
     */
    function canTypeBeValidated(type) {
        return type !== "UndefinedLiteral" && // {undefined} as there is no name property available.
               type !== "NullLiteral" && // {null}
               type !== "NullableLiteral" && // {?}
               type !== "FunctionType" && // {function(a)}
               type !== "AllLiteral"; // {*}
    }

    /**
     * Extract the current and expected type based on the input type object
     * @param {Object} type JSDoc tag
     * @returns {Object} current and expected type object
     * @private
     */
    function getCurrentExpectedTypes(type) {
        var currentType;
        var expectedType;

        if (type.name) {
            currentType = type.name;
        } else if (type.expression) {
            currentType = type.expression.name;
        }

        expectedType = currentType && preferType[currentType];

        return {
            currentType: currentType,
            expectedType: expectedType
        };
    }

    /**
     * Check if return tag type is void or undefined
     * @param {Object} jsdocNode JSDoc node
     * @param {Object} type JSDoc tag
     * @returns {void}
     * @private
     */
    function validateType(jsdocNode, type) {
        if (!type || !canTypeBeValidated(type.type)) {
            return;
        }

        var typesToCheck = [];
        var elements = [];

        switch (type.type) {
            case "TypeApplication":  // {Array.<String>}
                elements = type.applications[0].type === "UnionType" ? type.applications[0].elements : type.applications;
                typesToCheck.push(getCurrentExpectedTypes(type));
                break;
            case "RecordType":  // {{20:String}}
                elements = type.fields;
                break;
            case "UnionType":  // {String|number|Test}
            case "ArrayType":  // {[String, number, Test]}
                elements = type.elements;
                break;
            case "FieldType":  // Array.<{count: number, votes: number}>
                typesToCheck.push(getCurrentExpectedTypes(type.value));
                break;
            default:
                typesToCheck.push(getCurrentExpectedTypes(type));
        }

        elements.forEach(validateType.bind(null, jsdocNode));

        typesToCheck.forEach(function(typeToCheck) {
            if (typeToCheck.expectedType &&
                typeToCheck.expectedType !== typeToCheck.currentType) {
                context.report({
                    node: jsdocNode,
                    message: "Use '{{expectedType}}' instead of '{{currentType}}'.",
                    data: {
                        currentType: typeToCheck.currentType,
                        expectedType: typeToCheck.expectedType
                    }
                });
            }
        });
    }

    /**
     * Validate the JSDoc node and output warnings if anything is wrong.
     * @param {ASTNode} node The AST node to check.
     * @returns {void}
     * @private
     */
    function checkJSDoc(node) {
        var jsdocNode = sourceCode.getJSDocComment(node),
            functionData = fns.pop(),
            hasReturns = false,
            hasConstructor = false,
            isInterface = false,
            isOverride = false,
            isAbstract = false,
            params = Object.create(null),
            jsdoc;

        // make sure only to validate JSDoc comments
        if (jsdocNode) {

            try {
                jsdoc = doctrine.parse(jsdocNode.value, {
                    strict: true,
                    unwrap: true,
                    sloppy: true
                });
            } catch (ex) {

                if (/braces/i.test(ex.message)) {
                    context.report(jsdocNode, "JSDoc type missing brace.");
                } else {
                    context.report(jsdocNode, "JSDoc syntax error.");
                }

                return;
            }

            jsdoc.tags.forEach(function(tag) {

                switch (tag.title.toLowerCase()) {

                    case "param":
                    case "arg":
                    case "argument":
                        if (!tag.type) {
                            context.report(jsdocNode, "Missing JSDoc parameter type for '{{name}}'.", { name: tag.name });
                        }

                        if (!tag.description && requireParamDescription) {
                            context.report(jsdocNode, "Missing JSDoc parameter description for '{{name}}'.", { name: tag.name });
                        }

                        if (params[tag.name]) {
                            context.report(jsdocNode, "Duplicate JSDoc parameter '{{name}}'.", { name: tag.name });
                        } else if (tag.name.indexOf(".") === -1) {
                            params[tag.name] = 1;
                        }
                        break;

                    case "return":
                    case "returns":
                        hasReturns = true;

                        if (!requireReturn && !functionData.returnPresent && (tag.type === null || !isValidReturnType(tag)) && !isAbstract) {
                            context.report(jsdocNode, "Unexpected @" + tag.title + " tag; function has no return statement.");
                        } else {
                            if (requireReturnType && !tag.type) {
                                context.report(jsdocNode, "Missing JSDoc return type.");
                            }

                            if (!isValidReturnType(tag) && !tag.description && requireReturnDescription) {
                                context.report(jsdocNode, "Missing JSDoc return description.");
                            }
                        }

                        break;

                    case "constructor":
                    case "class":
                        hasConstructor = true;
                        break;

                    case "override":
                    case "inheritdoc":
                        isOverride = true;
                        break;

                    case "abstract":
                    case "virtual":
                        isAbstract = true;
                        break;

                    case "interface":
                        isInterface = true;
                        break;

                    // no default
                }

                // check tag preferences
                if (prefer.hasOwnProperty(tag.title) && tag.title !== prefer[tag.title]) {
                    context.report(jsdocNode, "Use @{{name}} instead.", { name: prefer[tag.title] });
                }

                // validate the types
                if (checkPreferType && tag.type) {
                    validateType(jsdocNode, tag.type);
                }
            });

            // check for functions missing @returns
            if (!isOverride && !hasReturns && !hasConstructor && !isInterface &&
                node.parent.kind !== "get" && node.parent.kind !== "constructor" &&
                node.parent.kind !== "set" && !isTypeClass(node)) {
                if (requireReturn || functionData.returnPresent) {
                    context.report(jsdocNode, "Missing JSDoc @" + (prefer.returns || "returns") + " for function.");
                }
            }

            // check the parameters
            var jsdocParams = Object.keys(params);

            if (node.params) {
                node.params.forEach(function(param, i) {
                    if (param.type === "AssignmentPattern") {
                        param = param.left;
                    }

                    var name = param.name;

                    // TODO(nzakas): Figure out logical things to do with destructured, default, rest params
                    if (param.type === "Identifier") {
                        if (jsdocParams[i] && (name !== jsdocParams[i])) {
                            context.report(jsdocNode, "Expected JSDoc for '{{name}}' but found '{{jsdocName}}'.", {
                                name: name,
                                jsdocName: jsdocParams[i]
                            });
                        } else if (!params[name] && !isOverride) {
                            context.report(jsdocNode, "Missing JSDoc for parameter '{{name}}'.", {
                                name: name
                            });
                        }
                    }
                });
            }

            if (options.matchDescription) {
                var regex = new RegExp(options.matchDescription);

                if (!regex.test(jsdoc.description)) {
                    context.report(jsdocNode, "JSDoc description does not satisfy the regex pattern.");
                }
            }

        }

    }

    //--------------------------------------------------------------------------
    // Public
    //--------------------------------------------------------------------------

    return {
        ArrowFunctionExpression: startFunction,
        FunctionExpression: startFunction,
        FunctionDeclaration: startFunction,
        ClassExpression: startFunction,
        ClassDeclaration: startFunction,
        "ArrowFunctionExpression:exit": checkJSDoc,
        "FunctionExpression:exit": checkJSDoc,
        "FunctionDeclaration:exit": checkJSDoc,
        "ClassExpression:exit": checkJSDoc,
        "ClassDeclaration:exit": checkJSDoc,
        ReturnStatement: addReturn
    };

}

};

},{“doctrine”:10}],352:[function(require,module,exports){ /**

* @fileoverview Ensures that the results of typeof are compared against a valid string
* @author Ian Christian Myers
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "enforce comparing `typeof` expressions against valid strings",
        category: "Possible Errors",
        recommended: true
    },

    schema: []
},

create: function(context) {

    var VALID_TYPES = ["symbol", "undefined", "object", "boolean", "number", "string", "function"],
        OPERATORS = ["==", "===", "!=", "!=="];

    //--------------------------------------------------------------------------
    // Public
    //--------------------------------------------------------------------------

    return {

        UnaryExpression: function(node) {
            var parent, sibling;

            if (node.operator === "typeof") {
                parent = context.getAncestors().pop();

                if (parent.type === "BinaryExpression" && OPERATORS.indexOf(parent.operator) !== -1) {
                    sibling = parent.left === node ? parent.right : parent.left;

                    if (sibling.type === "Literal" && VALID_TYPES.indexOf(sibling.value) === -1) {
                        context.report(sibling, "Invalid typeof comparison value");
                    }
                }
            }
        }

    };

}

};

},{}],353:[function(require,module,exports){ /**

* @fileoverview Rule to enforce var declarations are only at the top of a function.
* @author Danny Fritz
* @author Gyandeep Singh
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "require `var` declarations be placed at the top of their containing scope",
        category: "Best Practices",
        recommended: false
    },

    schema: []
},

create: function(context) {
    var errorMessage = "All 'var' declarations must be at the top of the function scope.";

    //--------------------------------------------------------------------------
    // Helpers
    //--------------------------------------------------------------------------

    /**
     * @param {ASTNode} node - any node
     * @returns {Boolean} whether the given node structurally represents a directive
     */
    function looksLikeDirective(node) {
        return node.type === "ExpressionStatement" &&
            node.expression.type === "Literal" && typeof node.expression.value === "string";
    }

    /**
     * Check to see if its a ES6 import declaration
     * @param {ASTNode} node - any node
     * @returns {Boolean} whether the given node represents a import declaration
     */
    function looksLikeImport(node) {
        return node.type === "ImportDeclaration" || node.type === "ImportSpecifier" ||
            node.type === "ImportDefaultSpecifier" || node.type === "ImportNamespaceSpecifier";
    }

    /**
     * Checks whether a given node is a variable declaration or not.
     *
     * @param {ASTNode} node - any node
     * @returns {boolean} `true` if the node is a variable declaration.
     */
    function isVariableDeclaration(node) {
        return (
            node.type === "VariableDeclaration" ||
            (
                node.type === "ExportNamedDeclaration" &&
                node.declaration &&
                node.declaration.type === "VariableDeclaration"
            )
        );
    }

    /**
     * Checks whether this variable is on top of the block body
     * @param {ASTNode} node - The node to check
     * @param {ASTNode[]} statements - collection of ASTNodes for the parent node block
     * @returns {Boolean} True if var is on top otherwise false
     */
    function isVarOnTop(node, statements) {
        var i = 0,
            l = statements.length;

        // skip over directives
        for (; i < l; ++i) {
            if (!looksLikeDirective(statements[i]) && !looksLikeImport(statements[i])) {
                break;
            }
        }

        for (; i < l; ++i) {
            if (!isVariableDeclaration(statements[i])) {
                return false;
            }
            if (statements[i] === node) {
                return true;
            }
        }

        return false;
    }

    /**
     * Checks whether variable is on top at the global level
     * @param {ASTNode} node - The node to check
     * @param {ASTNode} parent - Parent of the node
     * @returns {void}
     */
    function globalVarCheck(node, parent) {
        if (!isVarOnTop(node, parent.body)) {
            context.report(node, errorMessage);
        }
    }

    /**
     * Checks whether variable is on top at functional block scope level
     * @param {ASTNode} node - The node to check
     * @param {ASTNode} parent - Parent of the node
     * @param {ASTNode} grandParent - Parent of the node's parent
     * @returns {void}
     */
    function blockScopeVarCheck(node, parent, grandParent) {
        if (!(/Function/.test(grandParent.type) &&
                parent.type === "BlockStatement" &&
                isVarOnTop(node, parent.body))) {
            context.report(node, errorMessage);
        }
    }

    //--------------------------------------------------------------------------
    // Public API
    //--------------------------------------------------------------------------

    return {
        VariableDeclaration: function(node) {
            var ancestors = context.getAncestors();
            var parent = ancestors.pop();
            var grandParent = ancestors.pop();

            if (node.kind === "var") { // check variable is `var` type and not `let` or `const`
                if (parent.type === "ExportNamedDeclaration") {
                    node = parent;
                    parent = grandParent;
                    grandParent = ancestors.pop();
                }

                if (parent.type === "Program") { // That means its a global variable
                    globalVarCheck(node, parent);
                } else {
                    blockScopeVarCheck(node, parent, grandParent);
                }
            }
        }
    };

}

};

},{}],354:[function(require,module,exports){ /**

* @fileoverview Rule to flag when IIFE is not wrapped in parens
* @author Ilya Volodin
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "require parentheses around immediate `function` invocations",
        category: "Best Practices",
        recommended: false
    },

    schema: [
        {
            enum: ["outside", "inside", "any"]
        }
    ]
},

create: function(context) {

    var style = context.options[0] || "outside";

    var sourceCode = context.getSourceCode();

    /**
     * Check if the node is wrapped in ()
     * @param {ASTNode} node node to evaluate
     * @returns {boolean} True if it is wrapped
     * @private
     */
    function wrapped(node) {
        var previousToken = sourceCode.getTokenBefore(node),
            nextToken = sourceCode.getTokenAfter(node);

        return previousToken && previousToken.value === "(" &&
            nextToken && nextToken.value === ")";
    }

    return {

        CallExpression: function(node) {
            if (node.callee.type === "FunctionExpression") {
                var callExpressionWrapped = wrapped(node),
                    functionExpressionWrapped = wrapped(node.callee);

                if (!callExpressionWrapped && !functionExpressionWrapped) {
                    context.report(node, "Wrap an immediate function invocation in parentheses.");
                } else if (style === "inside" && !functionExpressionWrapped) {
                    context.report(node, "Wrap only the function expression in parens.");
                } else if (style === "outside" && !callExpressionWrapped) {
                    context.report(node, "Move the invocation into the parens that contain the function.");
                }
            }
        }
    };

}

};

},{}],355:[function(require,module,exports){ /**

* @fileoverview Rule to flag when regex literals are not wrapped in parens
* @author Matt DuVall <http://www.mattduvall.com>
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "require parenthesis around regex literals",
        category: "Stylistic Issues",
        recommended: false
    },

    schema: []
},

create: function(context) {
    var sourceCode = context.getSourceCode();

    return {

        Literal: function(node) {
            var token = sourceCode.getFirstToken(node),
                nodeType = token.type,
                source,
                grandparent,
                ancestors;

            if (nodeType === "RegularExpression") {
                source = sourceCode.getTokenBefore(node);
                ancestors = context.getAncestors();
                grandparent = ancestors[ancestors.length - 1];

                if (grandparent.type === "MemberExpression" && grandparent.object === node &&
                    (!source || source.value !== "(")) {
                    context.report(node, "Wrap the regexp literal in parens to disambiguate the slash.");
                }
            }
        }
    };

}

};

},{}],356:[function(require,module,exports){ /**

* @fileoverview Rule to check the spacing around the * in yield* expressions.
* @author Bryan Smith
*/

“use strict”;

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "require or disallow spacing around the `*` in `yield*` expressions",
        category: "ECMAScript 6",
        recommended: false
    },

    fixable: "whitespace",

    schema: [
        {
            oneOf: [
                {
                    enum: ["before", "after", "both", "neither"]
                },
                {
                    type: "object",
                    properties: {
                        before: {type: "boolean"},
                        after: {type: "boolean"}
                    },
                    additionalProperties: false
                }
            ]
        }
    ]
},

create: function(context) {
    var sourceCode = context.getSourceCode();

    var mode = (function(option) {
        if (!option || typeof option === "string") {
            return {
                before: { before: true, after: false },
                after: { before: false, after: true },
                both: { before: true, after: true },
                neither: { before: false, after: false }
            }[option || "after"];
        }
        return option;
    }(context.options[0]));

    /**
     * Checks the spacing between two tokens before or after the star token.
     * @param {string} side Either "before" or "after".
     * @param {Token} leftToken `function` keyword token if side is "before", or
     *     star token if side is "after".
     * @param {Token} rightToken Star token if side is "before", or identifier
     *     token if side is "after".
     * @returns {void}
     */
    function checkSpacing(side, leftToken, rightToken) {
        if (sourceCode.isSpaceBetweenTokens(leftToken, rightToken) !== mode[side]) {
            var after = leftToken.value === "*";
            var spaceRequired = mode[side];
            var node = after ? leftToken : rightToken;
            var type = spaceRequired ? "Missing" : "Unexpected";
            var message = type + " space " + side + " *.";

            context.report({
                node: node,
                message: message,
                fix: function(fixer) {
                    if (spaceRequired) {
                        if (after) {
                            return fixer.insertTextAfter(node, " ");
                        }
                        return fixer.insertTextBefore(node, " ");
                    }
                    return fixer.removeRange([leftToken.range[1], rightToken.range[0]]);
                }
            });
        }
    }

    /**
     * Enforces the spacing around the star if node is a yield* expression.
     * @param {ASTNode} node A yield expression node.
     * @returns {void}
     */
    function checkExpression(node) {
        if (!node.delegate) {
            return;
        }

        var tokens = sourceCode.getFirstTokens(node, 3);
        var yieldToken = tokens[0];
        var starToken = tokens[1];
        var nextToken = tokens[2];

        checkSpacing("before", yieldToken, starToken);
        checkSpacing("after", starToken, nextToken);
    }

    return {
        YieldExpression: checkExpression
    };

}

};

},{}],357:[function(require,module,exports){ /**

* @fileoverview Rule to require or disallow yoda comparisons
* @author Nicholas C. Zakas
*/

“use strict”;

//————————————————————————– // Helpers //————————————————————————–

/**

* Determines whether an operator is a comparison operator.
* @param {String} operator The operator to check.
* @returns {boolean} Whether or not it is a comparison operator.
*/

function isComparisonOperator(operator) {

return (/^(==|===|!=|!==|<|>|<=|>=)$/).test(operator);

}

/**

* Determines whether an operator is an equality operator.
* @param {String} operator The operator to check.
* @returns {boolean} Whether or not it is an equality operator.
*/

function isEqualityOperator(operator) {

return (/^(==|===)$/).test(operator);

}

/**

* Determines whether an operator is one used in a range test.
* Allowed operators are `<` and `<=`.
* @param {String} operator The operator to check.
* @returns {boolean} Whether the operator is used in range tests.
*/

function isRangeTestOperator(operator) {

return ["<", "<="].indexOf(operator) >= 0;

}

/**

* Determines whether a non-Literal node is a negative number that should be
* treated as if it were a single Literal node.
* @param {ASTNode} node Node to test.
* @returns {boolean} True if the node is a negative number that looks like a
*                    real literal and should be treated as such.
*/

function looksLikeLiteral(node) {

return (node.type === "UnaryExpression" &&
    node.operator === "-" &&
    node.prefix &&
    node.argument.type === "Literal" &&
    typeof node.argument.value === "number");

}

/**

* Attempts to derive a Literal node from nodes that are treated like literals.
* @param {ASTNode} node Node to normalize.
* @returns {ASTNode} The original node if the node is already a Literal, or a
*                    normalized Literal node with the negative number as the
*                    value if the node represents a negative number literal,
*                    otherwise null if the node cannot be converted to a
*                    normalized literal.
*/

function getNormalizedLiteral(node) {

if (node.type === "Literal") {
    return node;
}

if (looksLikeLiteral(node)) {
    return {
        type: "Literal",
        value: -node.argument.value,
        raw: "-" + node.argument.value
    };
}

return null;

}

/**

* Checks whether two expressions reference the same value. For example:
*     a = a
*     a.b = a.b
*     a[0] = a[0]
*     a['b'] = a['b']
* @param   {ASTNode} a Left side of the comparison.
* @param   {ASTNode} b Right side of the comparison.
* @returns {boolean}   True if both sides match and reference the same value.
*/

function same(a, b) {

if (a.type !== b.type) {
    return false;
}

switch (a.type) {
    case "Identifier":
        return a.name === b.name;

    case "Literal":
        return a.value === b.value;

    case "MemberExpression":

        // x[0] = x[0]
        // x[y] = x[y]
        // x.y = x.y
        return same(a.object, b.object) && same(a.property, b.property);

    case "ThisExpression":
        return true;

    default:
        return false;
}

}

//—————————————————————————— // Rule Definition //——————————————————————————

module.exports = {

meta: {
    docs: {
        description: "require or disallow \"Yoda\" conditions",
        category: "Best Practices",
        recommended: false
    },

    schema: [
        {
            enum: ["always", "never"]
        },
        {
            type: "object",
            properties: {
                exceptRange: {
                    type: "boolean"
                },
                onlyEquality: {
                    type: "boolean"
                }
            },
            additionalProperties: false
        }
    ]
},

create: function(context) {

    // Default to "never" (!always) if no option
    var always = (context.options[0] === "always");
    var exceptRange = (context.options[1] && context.options[1].exceptRange);
    var onlyEquality = (context.options[1] && context.options[1].onlyEquality);

    var sourceCode = context.getSourceCode();

    /**
     * Determines whether node represents a range test.
     * A range test is a "between" test like `(0 <= x && x < 1)` or an "outside"
     * test like `(x < 0 || 1 <= x)`. It must be wrapped in parentheses, and
     * both operators must be `<` or `<=`. Finally, the literal on the left side
     * must be less than or equal to the literal on the right side so that the
     * test makes any sense.
     * @param {ASTNode} node LogicalExpression node to test.
     * @returns {Boolean} Whether node is a range test.
     */
    function isRangeTest(node) {
        var left = node.left,
            right = node.right;

        /**
         * Determines whether node is of the form `0 <= x && x < 1`.
         * @returns {Boolean} Whether node is a "between" range test.
         */
        function isBetweenTest() {
            var leftLiteral, rightLiteral;

            return (node.operator === "&&" &&
                (leftLiteral = getNormalizedLiteral(left.left)) &&
                (rightLiteral = getNormalizedLiteral(right.right)) &&
                leftLiteral.value <= rightLiteral.value &&
                same(left.right, right.left));
        }

        /**
         * Determines whether node is of the form `x < 0 || 1 <= x`.
         * @returns {Boolean} Whether node is an "outside" range test.
         */
        function isOutsideTest() {
            var leftLiteral, rightLiteral;

            return (node.operator === "||" &&
                (leftLiteral = getNormalizedLiteral(left.right)) &&
                (rightLiteral = getNormalizedLiteral(right.left)) &&
                leftLiteral.value <= rightLiteral.value &&
                same(left.left, right.right));
        }

        /**
         * Determines whether node is wrapped in parentheses.
         * @returns {Boolean} Whether node is preceded immediately by an open
         *                    paren token and followed immediately by a close
         *                    paren token.
         */
        function isParenWrapped() {
            var tokenBefore, tokenAfter;

            return ((tokenBefore = sourceCode.getTokenBefore(node)) &&
                tokenBefore.value === "(" &&
                (tokenAfter = sourceCode.getTokenAfter(node)) &&
                tokenAfter.value === ")");
        }

        return (node.type === "LogicalExpression" &&
            left.type === "BinaryExpression" &&
            right.type === "BinaryExpression" &&
            isRangeTestOperator(left.operator) &&
            isRangeTestOperator(right.operator) &&
            (isBetweenTest() || isOutsideTest()) &&
            isParenWrapped());
    }

    //--------------------------------------------------------------------------
    // Public
    //--------------------------------------------------------------------------

    return {
        BinaryExpression: always ? function(node) {

            // Comparisons must always be yoda-style: if ("blue" === color)
            if (
                (node.right.type === "Literal" || looksLikeLiteral(node.right)) &&
                !(node.left.type === "Literal" || looksLikeLiteral(node.left)) &&
                !(!isEqualityOperator(node.operator) && onlyEquality) &&
                isComparisonOperator(node.operator) &&
                !(exceptRange && isRangeTest(context.getAncestors().pop()))
            ) {
                context.report(node, "Expected literal to be on the left side of " + node.operator + ".");
            }

        } : function(node) {

            // Comparisons must never be yoda-style (default)
            if (
                (node.left.type === "Literal" || looksLikeLiteral(node.left)) &&
                !(node.right.type === "Literal" || looksLikeLiteral(node.right)) &&
                !(!isEqualityOperator(node.operator) && onlyEquality) &&
                isComparisonOperator(node.operator) &&
                !(exceptRange && isRangeTest(context.getAncestors().pop()))
            ) {
                context.report(node, "Expected literal to be on the right side of " + node.operator + ".");
            }

        }
    };

}

};

},{}],358:[function(require,module,exports){ (function (process){ /**

* @fileoverview Tracks performance of individual rules.
* @author Brandon Mills
*/

“use strict”;

//—————————————————————————— // Helpers //——————————————————————————

/* istanbul ignore next */ /**

* Align the string to left
* @param {string} str string to evaluate
* @param {int} len length of the string
* @param {string} ch delimiter character
* @returns {string} modified string
* @private
*/

function alignLeft(str, len, ch) {

return str + new Array(len - str.length + 1).join(ch || " ");

}

/* istanbul ignore next */ /**

* Align the string to right
* @param {string} str string to evaluate
* @param {int} len length of the string
* @param {string} ch delimiter character
* @returns {string} modified string
* @private
*/

function alignRight(str, len, ch) {

return new Array(len - str.length + 1).join(ch || " ") + str;

}

//—————————————————————————— // Module definition //——————————————————————————

var enabled = !!process.env.TIMING;

var HEADERS = [“Rule”, “Time (ms)”, “Relative”]; var ALIGN = [alignLeft, alignRight, alignRight];

/* istanbul ignore next */ /**

* display the data
* @param {object} data Data object to be displayed
* @returns {string} modified string
* @private
*/

function display(data) {

var total = 0;
var rows = Object.keys(data)
    .map(function(key) {
        var time = data[key];

        total += time;
        return [key, time];
    })
    .sort(function(a, b) {
        return b[1] - a[1];
    })
    .slice(0, 10);

rows.forEach(function(row) {
    row.push((row[1] * 100 / total).toFixed(1) + "%");
    row[1] = row[1].toFixed(3);
});

rows.unshift(HEADERS);

var widths = [];

rows.forEach(function(row) {
    var len = row.length,
        i,
        n;

    for (i = 0; i < len; i++) {
        n = row[i].length;
        if (!widths[i] || n > widths[i]) {
            widths[i] = n;
        }
    }
});

var table = rows.map(function(row) {
    return row.map(function(cell, index) {
        return ALIGN[index](cell, widths[index]);
    }).join(" | ");
});

table.splice(1, 0, widths.map(function(w, index) {
    if (index !== 0 && index !== widths.length - 1) {
        w++;
    }

    return ALIGN[index](":", w + 1, "-");
}).join("|"));

console.log(table.join("\n"));      // eslint-disable-line no-console

}

/* istanbul ignore next */ module.exports = (function() {

var data = Object.create(null);

/**
 * Time the run
 * @param {*} key key from the data object
 * @param {Function} fn function to be called
 * @returns {Function} function to be executed
 * @private
 */
function time(key, fn) {
    if (typeof data[key] === "undefined") {
        data[key] = 0;
    }

    return function() {
        var t = process.hrtime();

        fn.apply(null, Array.prototype.slice.call(arguments));
        t = process.hrtime(t);
        data[key] += t[0] * 1e3 + t[1] / 1e6;
    };
}

if (enabled) {
    process.on("exit", function() {
        display(data);
    });
}

return {
    time: time,
    enabled: enabled
};

}());

}).call(this,require(‘_process’)) },{“_process”:117}],359:[function(require,module,exports){ /**

* @fileoverview Object to handle access and retrieval of tokens.
* @author Brandon Mills
*/

“use strict”;

//—————————————————————————— // Implementation //——————————————————————————

module.exports = function(tokens) {

var api = {},
    starts = Object.create(null),
    ends = Object.create(null),
    index, length, range;

/**
 * Gets tokens in a given interval.
 * @param {int} start Inclusive index of the first token. 0 if negative.
 * @param {int} end Exclusive index of the last token.
 * @returns {Token[]} Tokens in the interval.
 */
function get(start, end) {
    var result = [],
        i;

    for (i = Math.max(0, start); i < end && i < length; i++) {
        result.push(tokens[i]);
    }

    return result;
}

/**
 * Gets the index in the tokens array of the last token belonging to a node.
 * Usually a node ends exactly at a token, but due to ASI, sometimes a
 * node's range extends beyond its last token.
 * @param {ASTNode} node The node for which to find the last token's index.
 * @returns {int} Index in the tokens array of the node's last token.
 */
function lastTokenIndex(node) {
    var end = node.range[1],
        cursor = ends[end];

    // If the node extends beyond its last token, get the token before the
    // next token
    if (typeof cursor === "undefined") {
        cursor = starts[end] - 1;
    }

    // If there isn't a next token, the desired token is the last one in the
    // array
    if (isNaN(cursor)) {
        cursor = length - 1;
    }

    return cursor;
}

// Map tokens' start and end range to the index in the tokens array
for (index = 0, length = tokens.length; index < length; index++) {
    range = tokens[index].range;
    starts[range[0]] = index;
    ends[range[1]] = index;
}

/**
 * Gets a number of tokens that precede a given node or token in the token
 * stream.
 * @param {(ASTNode|Token)} node The AST node or token.
 * @param {int} [beforeCount=0] The number of tokens before the node or
 *     token to retrieve.
 * @returns {Token[]} Array of objects representing tokens.
 */
api.getTokensBefore = function(node, beforeCount) {
    var first = starts[node.range[0]];

    return get(first - (beforeCount || 0), first);
};

/**
 * Gets the token that precedes a given node or token in the token stream.
 * @param {(ASTNode|Token)} node The AST node or token.
 * @param {int} [skip=0] A number of tokens to skip before the given node or
 *     token.
 * @returns {Token} An object representing the token.
 */
api.getTokenBefore = function(node, skip) {
    return tokens[starts[node.range[0]] - (skip || 0) - 1];
};

/**
 * Gets a number of tokens that follow a given node or token in the token
 * stream.
 * @param {(ASTNode|Token)} node The AST node or token.
 * @param {int} [afterCount=0] The number of tokens after the node or token
 *     to retrieve.
 * @returns {Token[]} Array of objects representing tokens.
 */
api.getTokensAfter = function(node, afterCount) {
    var start = lastTokenIndex(node) + 1;

    return get(start, start + (afterCount || 0));
};

/**
 * Gets the token that follows a given node or token in the token stream.
 * @param {(ASTNode|Token)} node The AST node or token.
 * @param {int} [skip=0] A number of tokens to skip after the given node or
 *     token.
 * @returns {Token} An object representing the token.
 */
api.getTokenAfter = function(node, skip) {
    return tokens[lastTokenIndex(node) + (skip || 0) + 1];
};

/**
 * Gets all tokens that are related to the given node.
 * @param {ASTNode} node The AST node.
 * @param {int} [beforeCount=0] The number of tokens before the node to retrieve.
 * @param {int} [afterCount=0] The number of tokens after the node to retrieve.
 * @returns {Token[]} Array of objects representing tokens.
 */
api.getTokens = function(node, beforeCount, afterCount) {
    return get(
        starts[node.range[0]] - (beforeCount || 0),
        lastTokenIndex(node) + (afterCount || 0) + 1
    );
};

/**
 * Gets the first `count` tokens of the given node's token stream.
 * @param {ASTNode} node The AST node.
 * @param {int} [count=0] The number of tokens of the node to retrieve.
 * @returns {Token[]} Array of objects representing tokens.
 */
api.getFirstTokens = function(node, count) {
    var first = starts[node.range[0]];

    return get(
        first,
        Math.min(lastTokenIndex(node) + 1, first + (count || 0))
    );
};

/**
 * Gets the first token of the given node's token stream.
 * @param {ASTNode} node The AST node.
 * @param {int} [skip=0] A number of tokens to skip.
 * @returns {Token} An object representing the token.
 */
api.getFirstToken = function(node, skip) {
    return tokens[starts[node.range[0]] + (skip || 0)];
};

/**
 * Gets the last `count` tokens of the given node.
 * @param {ASTNode} node The AST node.
 * @param {int} [count=0] The number of tokens of the node to retrieve.
 * @returns {Token[]} Array of objects representing tokens.
 */
api.getLastTokens = function(node, count) {
    var last = lastTokenIndex(node) + 1;

    return get(Math.max(starts[node.range[0]], last - (count || 0)), last);
};

/**
 * Gets the last token of the given node's token stream.
 * @param {ASTNode} node The AST node.
 * @param {int} [skip=0] A number of tokens to skip.
 * @returns {Token} An object representing the token.
 */
api.getLastToken = function(node, skip) {
    return tokens[lastTokenIndex(node) - (skip || 0)];
};

/**
 * Gets all of the tokens between two non-overlapping nodes.
 * @param {ASTNode} left Node before the desired token range.
 * @param {ASTNode} right Node after the desired token range.
 * @param {int} [padding=0] Number of extra tokens on either side of center.
 * @returns {Token[]} Tokens between left and right plus padding.
 */
api.getTokensBetween = function(left, right, padding) {
    padding = padding || 0;
    return get(
        lastTokenIndex(left) + 1 - padding,
        starts[right.range[0]] + padding
    );
};

/**
 * Gets the token starting at the specified index.
 * @param {int} startIndex Index of the start of the token's range.
 * @returns {Token} The token starting at index, or null if no such token.
 */
api.getTokenByRangeStart = function(startIndex) {
    return (tokens[starts[startIndex]] || null);
};

return api;

};

},{}],360:[function(require,module,exports){ /**

* @fileoverview The event generator for comments.
* @author Toru Nagashima
*/

“use strict”;

//—————————————————————————— // Helpers //——————————————————————————

/**

* Check collection of comments to prevent double event for comment as
* leading and trailing, then emit event if passing
* @param {ASTNode[]} comments - Collection of comment nodes
* @param {EventEmitter} emitter - The event emitter which is the destination of events.
* @param {Object[]} locs - List of locations of previous comment nodes
* @param {string} eventName - Event name postfix
* @returns {void}
*/

function emitComments(comments, emitter, locs, eventName) {

if (comments.length > 0) {
    comments.forEach(function(node) {
        var index = locs.indexOf(node.loc);

        if (index >= 0) {
            locs.splice(index, 1);
        } else {
            locs.push(node.loc);
            emitter.emit(node.type + eventName, node);
        }
    });
}

}

/**

* Shortcut to check and emit enter of comment nodes
* @param {CommentEventGenerator} generator - A generator to emit.
* @param {ASTNode[]} comments - Collection of comment nodes
* @returns {void}
*/

function emitCommentsEnter(generator, comments) {

emitComments(
    comments,
    generator.emitter,
    generator.commentLocsEnter,
    "Comment");

}

/**

* Shortcut to check and emit exit of comment nodes
* @param {CommentEventGenerator} generator - A generator to emit.
* @param {ASTNode[]} comments Collection of comment nodes
* @returns {void}
*/

function emitCommentsExit(generator, comments) {

emitComments(
    comments,
    generator.emitter,
    generator.commentLocsExit,
    "Comment:exit");

}

//—————————————————————————— // Public Interface //——————————————————————————

/**

* The event generator for comments.
* This is the decorator pattern.
* This generates events of comments before/after events which are generated the original generator.
*
* @param {EventGenerator} originalEventGenerator - An event generator which is the decoration target.
* @param {SourceCode} sourceCode - A source code which has comments.
* @returns {CommentEventGenerator} new instance.
*/

function CommentEventGenerator(originalEventGenerator, sourceCode) {

this.original = originalEventGenerator;
this.emitter = originalEventGenerator.emitter;
this.sourceCode = sourceCode;
this.commentLocsEnter = [];
this.commentLocsExit = [];

}

CommentEventGenerator.prototype = {

constructor: CommentEventGenerator,

/**
 * Emits an event of entering comments.
 * @param {ASTNode} node - A node which was entered.
 * @returns {void}
 */
enterNode: function enterNode(node) {
    var comments = this.sourceCode.getComments(node);

    emitCommentsEnter(this, comments.leading);
    this.original.enterNode(node);
    emitCommentsEnter(this, comments.trailing);
},

/**
 * Emits an event of leaving comments.
 * @param {ASTNode} node - A node which was left.
 * @returns {void}
 */
leaveNode: function leaveNode(node) {
    var comments = this.sourceCode.getComments(node);

    emitCommentsExit(this, comments.trailing);
    this.original.leaveNode(node);
    emitCommentsExit(this, comments.leading);
}

};

module.exports = CommentEventGenerator;

},{}],361:[function(require,module,exports){ /**

* @fileoverview A shared list of ES3 keywords.
* @author Josh Perez
*/

“use strict”;

module.exports = [

"abstract",
"boolean",
"break",
"byte",
"case",
"catch",
"char",
"class",
"const",
"continue",
"debugger",
"default",
"delete",
"do",
"double",
"else",
"enum",
"export",
"extends",
"false",
"final",
"finally",
"float",
"for",
"function",
"goto",
"if",
"implements",
"import",
"in",
"instanceof",
"int",
"interface",
"long",
"native",
"new",
"null",
"package",
"private",
"protected",
"public",
"return",
"short",
"static",
"super",
"switch",
"synchronized",
"this",
"throw",
"throws",
"transient",
"true",
"try",
"typeof",
"var",
"void",
"volatile",
"while",
"with"

];

},{}],362:[function(require,module,exports){ /**

* @fileoverview The event generator for AST nodes.
* @author Toru Nagashima
*/

“use strict”;

//—————————————————————————— // Public Interface //——————————————————————————

/**

* The event generator for AST nodes.
* This implements below interface.
*
* ```ts
* interface EventGenerator {
*     emitter: EventEmitter;
*     enterNode(node: ASTNode): void;
*     leaveNode(node: ASTNode): void;
* }
* ```
*
* @param {EventEmitter} emitter - An event emitter which is the destination of events.
* @returns {NodeEventGenerator} new instance.
*/

function NodeEventGenerator(emitter) {

this.emitter = emitter;

}

NodeEventGenerator.prototype = {

constructor: NodeEventGenerator,

/**
 * Emits an event of entering AST node.
 * @param {ASTNode} node - A node which was entered.
 * @returns {void}
 */
enterNode: function enterNode(node) {
    this.emitter.emit(node.type, node);
},

/**
 * Emits an event of leaving AST node.
 * @param {ASTNode} node - A node which was left.
 * @returns {void}
 */
leaveNode: function leaveNode(node) {
    this.emitter.emit(node.type + ":exit", node);
}

};

module.exports = NodeEventGenerator;

},{}],363:[function(require,module,exports){ /**

* @fileoverview An object that creates fix commands for rules.
* @author Nicholas C. Zakas
*/

“use strict”;

//—————————————————————————— // Requirements //——————————————————————————

// none!

//—————————————————————————— // Helpers //——————————————————————————

/**

* Creates a fix command that inserts text at the specified index in the source text.
* @param {int} index The 0-based index at which to insert the new text.
* @param {string} text The text to insert.
* @returns {Object} The fix command.
* @private
*/

function insertTextAt(index, text) {

return {
    range: [index, index],
    text: text
};

}

//—————————————————————————— // Public Interface //——————————————————————————

/**

* Creates code fixing commands for rules.
* @constructor
*/

function RuleFixer() {

Object.freeze(this);

}

RuleFixer.prototype = {

constructor: RuleFixer,

/**
 * Creates a fix command that inserts text after the given node or token.
 * The fix is not applied until applyFixes() is called.
 * @param {ASTNode|Token} nodeOrToken The node or token to insert after.
 * @param {string} text The text to insert.
 * @returns {Object} The fix command.
 */
insertTextAfter: function(nodeOrToken, text) {
    return this.insertTextAfterRange(nodeOrToken.range, text);
},

/**
 * Creates a fix command that inserts text after the specified range in the source text.
 * The fix is not applied until applyFixes() is called.
 * @param {int[]} range The range to replace, first item is start of range, second
 *      is end of range.
 * @param {string} text The text to insert.
 * @returns {Object} The fix command.
 */
insertTextAfterRange: function(range, text) {
    return insertTextAt(range[1], text);
},

/**
 * Creates a fix command that inserts text before the given node or token.
 * The fix is not applied until applyFixes() is called.
 * @param {ASTNode|Token} nodeOrToken The node or token to insert before.
 * @param {string} text The text to insert.
 * @returns {Object} The fix command.
 */
insertTextBefore: function(nodeOrToken, text) {
    return this.insertTextBeforeRange(nodeOrToken.range, text);
},

/**
 * Creates a fix command that inserts text before the specified range in the source text.
 * The fix is not applied until applyFixes() is called.
 * @param {int[]} range The range to replace, first item is start of range, second
 *      is end of range.
 * @param {string} text The text to insert.
 * @returns {Object} The fix command.
 */
insertTextBeforeRange: function(range, text) {
    return insertTextAt(range[0], text);
},

/**
 * Creates a fix command that replaces text at the node or token.
 * The fix is not applied until applyFixes() is called.
 * @param {ASTNode|Token} nodeOrToken The node or token to remove.
 * @param {string} text The text to insert.
 * @returns {Object} The fix command.
 */
replaceText: function(nodeOrToken, text) {
    return this.replaceTextRange(nodeOrToken.range, text);
},

/**
 * Creates a fix command that replaces text at the specified range in the source text.
 * The fix is not applied until applyFixes() is called.
 * @param {int[]} range The range to replace, first item is start of range, second
 *      is end of range.
 * @param {string} text The text to insert.
 * @returns {Object} The fix command.
 */
replaceTextRange: function(range, text) {
    return {
        range: range,
        text: text
    };
},

/**
 * Creates a fix command that removes the node or token from the source.
 * The fix is not applied until applyFixes() is called.
 * @param {ASTNode|Token} nodeOrToken The node or token to remove.
 * @returns {Object} The fix command.
 */
remove: function(nodeOrToken) {
    return this.removeRange(nodeOrToken.range);
},

/**
 * Creates a fix command that removes the specified range of text from the source.
 * The fix is not applied until applyFixes() is called.
 * @param {int[]} range The range to remove, first item is start of range, second
 *      is end of range.
 * @returns {Object} The fix command.
 */
removeRange: function(range) {
    return {
        range: range,
        text: ""
    };
}

};

module.exports = RuleFixer;

},{}],364:[function(require,module,exports){ /**

* @fileoverview Abstraction of JavaScript source code.
* @author Nicholas C. Zakas
*/

“use strict”;

//—————————————————————————— // Requirements //——————————————————————————

var lodash = require(“lodash”),

createTokenStore = require("../token-store.js"),
Traverser = require("./traverser");

//—————————————————————————— // Private //——————————————————————————

/**

* Validates that the given AST has the required information.
* @param {ASTNode} ast The Program node of the AST to check.
* @throws {Error} If the AST doesn't contain the correct information.
* @returns {void}
* @private
*/

function validate(ast) {

if (!ast.tokens) {
    throw new Error("AST is missing the tokens array.");
}

if (!ast.comments) {
    throw new Error("AST is missing the comments array.");
}

if (!ast.loc) {
    throw new Error("AST is missing location information.");
}

if (!ast.range) {
    throw new Error("AST is missing range information");
}

}

/**

* Finds a JSDoc comment node in an array of comment nodes.
* @param {ASTNode[]} comments The array of comment nodes to search.
* @param {int} line Line number to look around
* @returns {ASTNode} The node if found, null if not.
* @private
*/

function findJSDocComment(comments, line) {

if (comments) {
    for (var i = comments.length - 1; i >= 0; i--) {
        if (comments[i].type === "Block" && comments[i].value.charAt(0) === "*") {

            if (line - comments[i].loc.end.line <= 1) {
                return comments[i];
            } else {
                break;
            }
        }
    }
}

return null;

}

/**

* Check to see if its a ES6 export declaration
* @param {ASTNode} astNode - any node
* @returns {boolean} whether the given node represents a export declaration
* @private
*/

function looksLikeExport(astNode) {

return astNode.type === "ExportDefaultDeclaration" || astNode.type === "ExportNamedDeclaration" ||
    astNode.type === "ExportAllDeclaration" || astNode.type === "ExportSpecifier";

}

//—————————————————————————— // Public Interface //——————————————————————————

/**

* Represents parsed source code.
* @param {string} text - The source code text.
* @param {ASTNode} ast - The Program node of the AST representing the code. This AST should be created from the text that BOM was stripped.
* @constructor
*/

function SourceCode(text, ast) {

validate(ast);

/**
 * The flag to indicate that the source code has Unicode BOM.
 * @type boolean
 */
this.hasBOM = (text.charCodeAt(0) === 0xFEFF);

/**
 * The original text source code.
 * BOM was stripped from this text.
 * @type string
 */
this.text = (this.hasBOM ? text.slice(1) : text);

/**
 * The parsed AST for the source code.
 * @type ASTNode
 */
this.ast = ast;

/**
 * The source code split into lines according to ECMA-262 specification.
 * This is done to avoid each rule needing to do so separately.
 * @type string[]
 */
this.lines = SourceCode.splitLines(this.text);

this.tokensAndComments = ast.tokens.concat(ast.comments).sort(function(left, right) {
    return left.range[0] - right.range[0];
});

// create token store methods
var tokenStore = createTokenStore(ast.tokens);

Object.keys(tokenStore).forEach(function(methodName) {
    this[methodName] = tokenStore[methodName];
}, this);

var tokensAndCommentsStore = createTokenStore(this.tokensAndComments);

this.getTokenOrCommentBefore = tokensAndCommentsStore.getTokenBefore;
this.getTokenOrCommentAfter = tokensAndCommentsStore.getTokenAfter;

// don't allow modification of this object
Object.freeze(this);
Object.freeze(this.lines);

}

/**

* Split the source code into multiple lines based on the line delimiters
* @param {string} text Source code as a string
* @returns {string[]} Array of source code lines
* @public
*/

SourceCode.splitLines = function(text) {

return text.split(/\r\n|\r|\n|\u2028|\u2029/g);

};

SourceCode.prototype = {

constructor: SourceCode,

/**
 * Gets the source code for the given node.
 * @param {ASTNode=} node The AST node to get the text for.
 * @param {int=} beforeCount The number of characters before the node to retrieve.
 * @param {int=} afterCount The number of characters after the node to retrieve.
 * @returns {string} The text representing the AST node.
 */
getText: function(node, beforeCount, afterCount) {
    if (node) {
        return this.text.slice(Math.max(node.range[0] - (beforeCount || 0), 0),
            node.range[1] + (afterCount || 0));
    } else {
        return this.text;
    }

},

/**
 * Gets the entire source text split into an array of lines.
 * @returns {Array} The source text as an array of lines.
 */
getLines: function() {
    return this.lines;
},

/**
 * Retrieves an array containing all comments in the source code.
 * @returns {ASTNode[]} An array of comment nodes.
 */
getAllComments: function() {
    return this.ast.comments;
},

/**
 * Gets all comments for the given node.
 * @param {ASTNode} node The AST node to get the comments for.
 * @returns {Object} The list of comments indexed by their position.
 * @public
 */
getComments: function(node) {

    var leadingComments = node.leadingComments || [],
        trailingComments = node.trailingComments || [];

    /*
     * espree adds a "comments" array on Program nodes rather than
     * leadingComments/trailingComments. Comments are only left in the
     * Program node comments array if there is no executable code.
     */
    if (node.type === "Program") {
        if (node.body.length === 0) {
            leadingComments = node.comments;
        }
    }

    return {
        leading: leadingComments,
        trailing: trailingComments
    };
},

/**
 * Retrieves the JSDoc comment for a given node.
 * @param {ASTNode} node The AST node to get the comment for.
 * @returns {ASTNode} The BlockComment node containing the JSDoc for the
 *      given node or null if not found.
 * @public
 */
getJSDocComment: function(node) {

    var parent = node.parent;

    switch (node.type) {
        case "ClassDeclaration":
        case "FunctionDeclaration":
            if (looksLikeExport(parent)) {
                return findJSDocComment(parent.leadingComments, parent.loc.start.line);
            }
            return findJSDocComment(node.leadingComments, node.loc.start.line);

        case "ClassExpression":
            return findJSDocComment(parent.parent.leadingComments, parent.parent.loc.start.line);

        case "ArrowFunctionExpression":
        case "FunctionExpression":

            if (parent.type !== "CallExpression" && parent.type !== "NewExpression") {
                while (parent && !parent.leadingComments && !/Function/.test(parent.type) && parent.type !== "MethodDefinition" && parent.type !== "Property") {
                    parent = parent.parent;
                }

                return parent && (parent.type !== "FunctionDeclaration") ? findJSDocComment(parent.leadingComments, parent.loc.start.line) : null;
            } else if (node.leadingComments) {
                return findJSDocComment(node.leadingComments, node.loc.start.line);
            }

        // falls through

        default:
            return null;
    }
},

/**
 * Gets the deepest node containing a range index.
 * @param {int} index Range index of the desired node.
 * @returns {ASTNode} The node if found or null if not found.
 */
getNodeByRangeIndex: function(index) {
    var result = null,
        resultParent = null,
        traverser = new Traverser();

    traverser.traverse(this.ast, {
        enter: function(node, parent) {
            if (node.range[0] <= index && index < node.range[1]) {
                result = node;
                resultParent = parent;
            } else {
                this.skip();
            }
        },
        leave: function(node) {
            if (node === result) {
                this.break();
            }
        }
    });

    return result ? lodash.assign({parent: resultParent}, result) : null;
},

/**
 * Determines if two tokens have at least one whitespace character
 * between them. This completely disregards comments in making the
 * determination, so comments count as zero-length substrings.
 * @param {Token} first The token to check after.
 * @param {Token} second The token to check before.
 * @returns {boolean} True if there is only space between tokens, false
 *  if there is anything other than whitespace between tokens.
 */
isSpaceBetweenTokens: function(first, second) {
    var text = this.text.slice(first.range[1], second.range[0]);

    return /\s/.test(text.replace(/\/\*.*?\*\//g, ""));
}

};

module.exports = SourceCode;

},{“../token-store.js”:359,“./traverser”:365,“lodash”:108}],365:[function(require,module,exports){ /**

* @fileoverview Wrapper around estraverse
* @author Nicholas C. Zakas
*/

“use strict”;

//—————————————————————————— // Requirements //——————————————————————————

var estraverse = require(“estraverse”);

//—————————————————————————— // Helpers //——————————————————————————

var KEY_BLACKLIST = [

"parent",
"leadingComments",
"trailingComments"

];

/**

* Wrapper around an estraverse controller that ensures the correct keys
* are visited.
* @constructor
*/

function Traverser() {

var controller = Object.create(new estraverse.Controller()),
    originalTraverse = controller.traverse;

// intercept call to traverse() and add the fallback key to the visitor
controller.traverse = function(node, visitor) {
    visitor.fallback = Traverser.getKeys;
    return originalTraverse.call(this, node, visitor);
};

return controller;

}

/**

* Calculates the keys to use for traversal.
* @param {ASTNode} node The node to read keys from.
* @returns {string[]} An array of keys to visit on the node.
* @private
*/

Traverser.getKeys = function(node) {

return Object.keys(node).filter(function(key) {
    return KEY_BLACKLIST.indexOf(key) === -1;
});

};

module.exports = Traverser;

},{“estraverse”:87}]},{},[135])(135) });